Change directory
1. Switch letter
Example: c:, d:
2. Change the working directory: cd path, cd command to switch only the working directory in the same letter
For example: cd c: \ Program Files (x86) \ Dict \
3. If you want to cross the disk operation requires auxiliary parameter / d
Example: cd / d c: \ Program Files (x86) \ Dict \
delete
1. Delete the folder
Delete empty directories rd folder name
Delete non-empty directories rd / s / q folder name
2. Delete File
Delete files del filename
New
1. New Folder
Mkdir + folder name
2. Create a new file
(1)copy
copy nul A.txt can create an empty file, it is often used in a batch process, a file can be empty.
copy con A.txt A.txt create a text file;
Written content, press Enter to add to the file; after the completion of exit press ctrl + z
(2)echo
Content to be added before the echo content> A.txt redirect the output, then create a text file and overwrite A.txt
echo to be adding additional information to the content >> A.txt A.txt file;
copy
1. Copy the folder
First create a folder and then use the copy command format: copy the source directory target directory
(Also it can be used as format conversion, for example, txt txt turn or turn bat c)
2 Copy files
Direct copy can not require you to have documents
3. XCOPY-- directory copy command ( copy all the files under the specified directory and directory along with the directory structure )
Format: the XCOPY [source disk:] <source path name> [Target drive:] [target path name] [/ S] [/ V] [/ E]
Examples: xcopy ldm_appl tmp / s
Note:
1. Specify the / E parameter, otherwise no copy of the copy directories empty empty directories (with the premise parameter / s.)
2. Specify the / S parameter, a copy source directory and its subdirectories, files or copy only;
3. Copy the folder may want to create a destination folder
mobile
Move and copy commands similar format, move the source file or directory target file or directory
Notes manner bat file
(1) represents a line comments ::
(2) goto keyword annotation segment a jump to a position
goto here
Executable commands
:here
Pause :: without closing the window after completion of the routine.