cheatsheet dos

Cheatsheat for DOS batches

Comment REM This is a comment in a DOS batch file
print ECHO Hello World!
Arguments %1 %2 %3
if IF (condition) (
REM Do stuff
) ELSE (
REM Do other stuff
)
for for /l %%x in (1, 1, 5) do ( REM Do stuff)
Exit EXIT
Get return code ECHO %errorlevel%
creating temp files in PowerShell
get year in dos-batch