I want to write a bat file with a 'Menu'. Something like
Press 1 to do this or Press 2 to do that', and then have
the bat file act according to the user input. I can't
remember for the life of me how to do this. Thanks in
It is a long long ago topic in dos age. :P I still remember that when I was
using DOS, we often think of different ways to write bat command and there
are many reference books.
I don't remember exactly it now. I think you may need to do some goto or...
However, why not just dev a simple c++ program to do so? It is also very
easy. If the command is usually changed, you can use a config file and let
c++ program to read config file first.
VS.NET, Visual C++
This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
!Subject: Bat File Input
!Date: Tue, 7 Jan 2003 10:47:13 -0800
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!NNTP-Posting-Host: TK2MSFTNGXA04 10.40.1.52
!Xref: cpmsftngxa09 microsoft.public.win32.programmer.tools:362
!I want to write a bat file with a 'Menu'. Something like
!Press 1 to do this or Press 2 to do that', and then have
!the bat file act according to the user input. I can't
!remember for the life of me how to do this. Thanks in
IF ERRORLEVEL 5 GOTO label5
IF ERRORLEVEL 4 GOTO label4
You must check the highest ERRORLEVEL first, because "IF ERRORLEVEL 5"
means s.th. lile "if ERRORLEVEL is greater or equal 5".
Without command line parameters CHOICE will ask for Y/N. You can
specify the letters and optional a message text with command line
Jan Henrik Sylvester
On Tue, 7 Jan 2003 10:47:13 -0800, "John Collins"
I am in need of a way to do an install and edit the Path statement in the
Is there a way to do this via a command line in a batch file?
thanks a million!
4. file busy