Let’s start with some batch basics. If you are already familiar with them skip this section.
- @echo off – Should be added at the top of your batch script to prevent printing all commands.
- echo Some text – Output: “Some text”
- echo. – Empty line
- set /a index=0 – Set numeric variable
- echo Index is %index% – Output: “Index is 0”
- Rem It is a comment
- :: It is a comment too
- echo Some text>> test.txt – Write “Some text” to test.txt file.