need help with batch file command

kreactor

Senior member
Jan 3, 2005
709
0
76
in the late 80's in pc magazine, there was a user submitted batchfile program that changes behavior based on the variable?

i.e.
batch file was gogopowerrangers.bat

if i type in command prompt

gogopowerrangers nc (it would open norton commander)
gogopowerrangers nsd (it would open norton speed disk)

anyone know what commands i would need to read up on. thanks

edit:change name of the batch file to gogopowerrangers
edit: looks like i'm looking for the command 'shift' and parameters (thanks ken_g6)
 
Last edited:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,838
4,817
75
Your given example sounds a lot like the built-in Windows "start" command.

But if you want to make your own batch file, you probably want to look at:

- Parameters
- If
- And, from that last link, it also looks like parameters can be expanded in a goto statement, making it a lot like a switch statement.
 
Mar 1, 2007
30
0
0
You can use "start <path_to_executable> <parameters>" to launch a program from a batch file. Follow it with "exit" to close the batch window
 
Last edited: