This is a draft cheat sheet. It is a work in progress and is not finished yet.
About
consists of a series of commands |
executed by the command-line interpreter |
stored in a plain text file |
(https://en.wikipedia.org/wiki/Batch_file)
Passing parameters
%0 |
The program name as it was called |
%1 to %9 |
The command line parameters |
Formatting
@ |
Commands starting with @ are not printed in the console |
REM |
Starts a comment (1-liner) |
Basic commands
set |
Defines the value of a variable. |
|
|
Special variables
%errorlevel% |
%cd% |
current working directory |
%time% |
%date% |
%comspec% |
%Random% |
%CmdExtVersion% |
|
|
|