A. Windows NT 4.0 introduced several extensions to cmd.exe. Use these extensions to ensure that the HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions registry entry is set to 1.
The following table lists the most commonly used commands.
|call <batch file>||Calls one batch file from inside another. The current batch file’s execution is suspended until the called batch file completes.|
|exit||Stops a batch file from running. If one batch file calls another, exit stops both batch files.|
|findstr <string> <filename(s)>||Finds a string in a file. This powerful command has several parameters.|
|for||Standard for loop. The command |
|goto <label>||Causes a program’s execution to skip to a given point. A colon must precede the label name. For example, |
|if <condition> ..||The if statement has a lot of functionality. Common uses include the following. |
LEQ—less than or equal
GEQ—greater than or equal
if exist <file name>
|rem <string>||A comment.|
|start <window title> <command>||Starts a new command session and runs a given command. Unlike with the call command, the current batch file’s execution continues.|
Learn more: Resource Kit Batch File Commands
The Microsoft Windows NT Resource Kit includes some additional utilities that you might find useful.