.BAT file - What are all of the possible switches that will work outside a batch script? [closed]

Is there a resource that lists all of the possible switches that you can use on a bat file?

I found this one that closes cmd.exe, which is very useful . . . "Startup.bat /B" . . . it took me hours to find it.

/B . . . Specifies to exit the current batch script instead of CMD.EXE. If executed from outside a batch script, it will quit CMD.EXE . . . . . . DOES LOWER CASE b WORK? YES

I put this bat file in my Startup folder, and use it as my Startup. The bat file makes it very easy to disable all Startups, just by re-naming it with the .txt extension.

I wanted to see if there is a built-in switch like /S or /Q, where it would run the bat file silently, and you wouldn't see it . . . But maybe there isn't, on purpose, because it would be used for viruses.

2

1 Answer

Batch files themselves do not have any inherent switches.

They can accept parameters that can be passed into the batch file to be used as switches (or other things) as needed by the commands within the batch, but those are defined/implimented by the author of the batch script.

The switch you're speaking of (/B) is for the Exit command. If you want a list of switches for Exit (or practically any command prompt command), open a command prompt and type exit /?.

1

You Might Also Like