Recently, a software I used requires a large number of environment variables, and I do not want to add these variables to the system environment variables, on the one hand, because there are different versions of database files with the same name, they will interfere with each other when written in the system environment; on the other hand, most of the paths are only required in this software, therefore, it is most appropriate to use bat for processing.
BAT files are frequently used in windows, and they also have a set of syntax standards. below is what I think I need to know about bat, even if I cannot write these files, at least anyone else can understand it. This article first introduces the basic symbols, because when I first read bat
1. @ symbol
This symbol does not have any special meaning. It is generally used for the first position of a line only to make it not displayed in the command line when the modified line is running.
@ Echo on/off: equivalent to whether to output the command in the command line
2.% symbol
This symbol is usually used in pairs with variable names in the center, such as % Sam %. It is equivalent to a variable and is generally used to represent a string.
% I % (I is a parameter): used to represent command line parameters, such as test. Bat 'abc' 'bcd ';
For example, % ~ Dp0. This is a special expression referring to the current path.
3, Rem
This symbol indicates the meaning of the comment, which is equivalent to the // in C language. You can comment a line.
BAT (batch file) first basic symbol