See a batch of files today, the content is very simple, the implementation is very convenient, learning a bit to know is a DOS command,
It's okay to master a few of these common commands to read someone else's files.
- [email protected] generally followed by similar @echo off
It acts like echo off does not display its command itself (c:\users\xx>), but the echo off global has the effect, @ only the effect on the bank, so the two general, echo on to open echo command line function
- 2.set Name=zhangsan Setting the function of the parameter
- 3.%name% reading the value of a parameter
- 4.set/p name= Please enter a name here Add a/p to represent the need for keyboard input
- 5.pause pause function waits for keyboard input and exits
- 6.echo Book>1.txt > represents writing the file book to 1.txt, overwriting the content (similar to >> it does not overwrite the contents of the output) No output is nul
- 7.set/p Book=<1.txt just input only the first line of the 1.txt copy to book available echo%book% output inspection
- 8.rem is similar to annotations:: No more console output and execution
- 9.: Tab positioning for Goto is very useful
The above several commands are more commonly used, the actual reading is sufficient, the remaining few connection commands feel basically not often
BAT file from @ meaning