Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch file Switches
Name: jezza Date: February 3, 2004 at 06:02:18 Pacific OS: xp/win2k3 CPU/Ram: +2500, 1GB RAM
Comment:
Hey, Is it possible to add switches to a batch file?
For example "name.bat /install" & "name.bat /uninstall"
Name: JackG Date: February 3, 2004 at 07:57:25 Pacific
Reply:
You pass parameters on the command line to a batch file, and there is no reason you can not call them "switches" that you check for. You just have to check the parameters for the whole "switch" just like you would check for any parameter passed.
0
Response Number 2
Name: Wengier Date: February 3, 2004 at 13:26:50 Pacific
Reply:
If you add a "switch" to a batch file, then the "switch" will become the standard replaceable parameter of the batch, namely %1, %2, etc.
Summary: I would like to assign switches to a batch file. I am asking here because I haven't been able to find much on the net, and the information that I have found is not detailed enough. For example, I have...
Summary: Thank you very much for your reply but I am very new to batch files (2 weeks actually). I am learning to write them via a book so I don't understand or don't know where to put your reply in my batch f...
Summary: To Delete a dir and all contents ... deltree [drive:/path/dirtobedeleted] So you woulden't want to type something like c:>deltree c:\windows ;-) -------------------------------- To format a MASTER dri...