Choosable Batch Options
Loading...
1,820
Loading...
Uploader Comments (dmengeler)
see all
All Comments (9)
-
No Worries :)
-
thanx man!
-
This Batch allows you to use two switches, if either one says "Y" or "Yes" it will go to Success. If the switches say other things or are not used, it will go to failed.
Do not use "-" before the switches. Simply type the switch you want.
For example, this would bring success:
batchfilename.bat yes
You can add other switches by adding another line saying:
set switchname=%X
Where X is the switch number. For example:
'Batchname.bat a r z'
In this example z is switch three, %3.
-
:Success
echo Worked
pause
goto end
:Failure
echo failed
pause
:end
-
I'll post a batch file to help here Has to be in two parts though... @ECHO OFF set switch1=%1 set switch2=%2 if not defined switch1 (goto switch2) if /i %switch1%==Y (goto Success) if /i %switch1%==Yes (goto Success) :switch2 if not defined switch2 (goto Failure) if /i %switch2%==Y (goto Success) if /i %switch2%==Yes (goto Success) goto Failure
Loading...
how can you make batch parameters
ex mcrsvr.bat -k -r
or /k /r stuff like that
windows has a file in the 32 that uses parameters for one of the batch files
GhostXoP 3 years ago
Sorry man. I haven't done batch in SO long that I can't even remember. Sorry.
dmengeler 3 years ago
this is the only thing i cant do with batch, but for everything else, i can do anything with batch code. but its not complete with out this info but thanks anyway.
GhostXoP 3 years ago
Sorry. Thanks for understanding.
dmengeler 3 years ago
You dont need to call it for input...
You could also call it something Dialogue!
MouthofSaurons 4 years ago
Yeah, I know. But if I try to say that, people get confused.
dmengeler 4 years ago