Recently I used a software that requires a lot of environment variable settings, and I do not want to say that these variables are added to the system environment variables, on the one hand, because some of the same name of the library file version number is different, written in the system environment will interfere with each other, and another aspect is that most of the path is only required in this software, It is therefore most appropriate to process with bat.
BAT file is a more frequently used file format in Windows, he also has a set of grammatical standards, the following is what I think learning bat need to understand, master these even if they can not write, at least others can read. This article first tells the basic symbol, because I most start to look at bat when it is because of these symbols to feel it is very magical.
1, @ symbol
This symbol does not have a special meaning, generally used for a row of the beginning of the position is only to make the row execution when not displayed on the command line
@ECHO on/OFF: The switch that corresponds to whether to output commands on the command line
2,% symbol
This symbol is generally used in pairs, in the middle of the variable name, such as:%sam%, equivalent to a variable, commonly used to represent a string
%i% (i is the parameter): used to denote command line parameters, such as: Test.bat ' abc ' BCD ';
Also like this:%~dp0, this is a special expression that refers to the current path
3, REM
This symbol represents the meaning of the gaze, which is equivalent to//in the C language, able to gaze at a line
Bat (batch file) preliminary first basic symbol