DOS Common commands (capitalization doesn't matter)
Rem for annotations, easy to get started reading the role of batch files
Example:
REM This batch file is used only for compiling and running Java programs, do not use it (at this point the text behind REM is not executed as a command, skip directly, just for reading)
:: Same as comment command, subsequent text is just comment, not command
Echo echoing command for printing subsequent text to the DOS screen (as-is output)
Example:
Echo Welcome to the Java World (output as shown below)
@ Turn off single-line echo
Example:
If you add @ to the Echo Welcome to the Java World, what will it output?
Careful you are not found "@echo Welcome to the Java World", but the direct output, which means whether the "echo Welcome to the Java World" or "@echo Welcome to the Java World" are interpreted as commands, but is similar to the C language printing function printf function. The function of @ is obvious, that is, do not need to output the line's command to the screen, that is, to turn off the echo, to know that the batch command is to perform the operation is written out, in order, then let the cmd (command interpreter) to read the command line by row and execute the corresponding process. Sometimes we write a batch file to achieve a purpose, often only need a portal (tell the consumer how to use the batch file) and a processed result, and do not need to let the user see the results of each step, you should use the @ command
echo off starts from the next line to turn off Echo
@echo off Turn off Echo function from bank start
echo on starts from the next line to open the Echo
Echo. Print a blank line (similar to line break in C \ n)
%1,%2...%9 command-line arguments
If you want your batch file to be more adaptable, you can use command-line arguments to resolve
MD Create Directory
RD Delete Directory
Dir View all current directories and files
CD Open Directory
CLS Clear Screen
. Current path
.. Parent path of the current path
Pause wait
Other commands detailed explanation and usage please own Baidu.