I hope I never have to write another Windows .BAT file again in my life, but if I don't jot this stuff down, I will forget it, and then I will.
- Use
:somelabel
to define a block of code. - Use
call :somelabel
to jump to a defined label, run that block of code to the end, then return. - Use
goto :label
to jump to that label. - Put
:eof
at the end of your file.