1847950 Members
4510 Online
104021 Solutions
New Discussion

Script help

 
SOLVED
Go to solution
Ashwin_4
Frequent Advisor

Script help

hi masters,
Pl. help me to cconver the following part of unix shell script in dos batch file.

----------X-----------
echo "Enter FileName :\c "
read FN
echo "FileName $FN"
----------X-----------

Thanks


6 REPLIES 6
Sanjay Kumar Suri
Honored Contributor
Solution

Re: Script help

@ECHO off
set FN=
set /p FN=Enter FileName
ECHO FileName "%FN%"

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Ashwin_4
Frequent Advisor

Re: Script help

hi, Can we echo character on screen with color background?
Pete Randall
Outstanding Contributor
Bill Hassell
Honored Contributor

Re: Script help

DOS is not a terminal emulator so it has no easy capability to change colors on the screen. In a modern DOS window, you have the ability to change the entire window color scheme (click on the little icon in the upper left corner and select Properties). You can (with some effort) do some things with DOS colors. Here is a reference: http://www.robvanderwoude.com/index.html


Bill Hassell, sysadmin
rmueller58
Valued Contributor

Re: Script help

With DOS you can change screen colors, but as I recall (and it's been a while it requires load ansi.sys in the config.sys.
rmueller58
Valued Contributor

Re: Script help

# Color Normal
foreground Bold
foreground Background
0 Black [30m [1;30m [40m
1 Red [31m [1;31m [41m
2 Green [32m [1;32m [42m
3 Yellow [33m [1;33m [43m
4 Blue [34m [1;34m [44m
5 Magenta [35m [1;35m [45m
6 Cyan [36m [1;36m [46m
7 White [37m [1;37m [47m
Note: Use the COLOR command or CMD /T to set the default text colors in NT command line sessions