Batch tips,
for/f parameter usage:
1.1 "delims=*" equals the left and right spaces are meaningful.
1.2 option's default parameter is "delims=", so the default parameter case, read a line of parameters encountered a space is not read. To finish reading the whole line, we can make the delims argument the last character.
Summary of SET parameters:
2.1 Set i= "ABC" assigns a string to I. Such as:
Set i= "ABC"
Echo%i%
If%i%== "abc" (Echo equal to ABC) else (echo don t equal to ABC)
2.2 set/a i=123 assigning numbers to I
2.3 set/p i= Please enter a value for I, the default input is a number, if you want to use the string, I need to call the variable when I want to add "", such as:
3.3 set/p I=please told me your options:
Echo%i%
If "%i%" = = "A" (Goto Addpatch) Else (goto Installpatch)
: Addpatch
echo Add patch
Goto:eof
: Installpatch
echo Install patch
Goto:eof
For and set parameters learning notes