Some basic commands of Windows Batch Scripting
Parsing file using For Loop Suppose a file mytext.txt contains firstT 2ndT 3rdT 4thT ;1st2T 2nd2T 3rd2T 4th2T 1st3T 2nd3T 3rd3T If I want to parse the content of the file I will need to write to the below command for /F "eol=; tokens=1,2,3* delims= " %i in (myfile.txt) do @echo %i %j %k %l It means This command parses each line in myfile.txt, ignoring lines that begin with a semicolon and passing the first, second and third token from each line to the FOR body (tokens are delimited by spaces). The body of the FOR statement references %i to get the first token, %j to get the second token, %k to get the third one and %l to get all of the remaining tokens. Delimeter can be any thing and needs to be written after delims=. Often you could see set /A command in any batch script. The interpretation is like Set Displays, sets, or removes environment variables. Used without parameters, set displays the current environment settings. Syntax set [[/a [expression]] [...