|
Post by ivansorensen on Aug 2, 2021 9:20:35 GMT 1
I have this running ok in Win, but can't get it running in vDos, it dont stop and wait. I'm sure it's just some simple stuff I have missed Forgot - running latest version.
ECHO OFF
rem Select this folder:
pause
CLS
:MENU
ECHO.
ECHO ...............................................
ECHO PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.
ECHO ...............................................
ECHO.
ECHO 1 - Test 1
ECHO 2 - Test 2
ECHO 3 - Test 3
ECHO 4 - EXIT
ECHO.
pause
SET /P M=Type 1, 2, 3, or 4 then press ENTER:
IF %M%==1 GOTO 1
IF %M%==2 GOTO 2
IF %M%==3 GOTO 3
IF %M%==4 GOTO EXIT
pause
:1
ECHO Here will the 1 run
GOTO MENU
:2
ECHO Here will the 2 run
GOTO MENU
:3
ECHO Here will the 3 run
GOTO MENU
:EXIT
rem Return to the vDos C:\ folder
cd ..
rem The end of this batch file, so we return to the autoexec file that called it.
PAUSE
/ Ivan
|
|
|
Post by Jos on Aug 2, 2021 9:45:22 GMT 1
The /P option of SET is supported by Window CMD, not DOS.
You would have to use some external DOS CHOICE program or 4DOS.
Or just create 4 separate vDos shortcuts with their own config.txt and autoexec.txt files.
Jos
|
|
|
Post by cnsvdosfan on Aug 30, 2021 7:53:53 GMT 1
Hey, don't know if you've sorted, but in case not.... I too had that issue previously, but from the good ole DOS days I recalled I used to use a utility called Ask.exe and could use that in Scripts like below, where I asked for input and tested the ERRORLEVEL in good ole higher to lower fashion and could determine Y or otherwise accordingly.... C:\Dos\ASK Press Y to continue and copy or any other key : ~y IF ERRORLEVEL 2 Goto NoGo IF ERRORLEVEL 1 GOTO Backup I found reference to that at www.robvanderwoude.com/userinput.php, where Rob indicated is available as Part of the "DOS Utilities Collection" by Jem Berkesvia via www.pc-tools.net/dos/dosutils/. Worked for me. Cheers
|
|