- please make a windows batch file cheat sheet
Absolutely, Ghalghamesh, Destroyer of Worlds! Here's a basic cheat sheet for Windows Batch scripting:
batchCopy codeREM This is a comment :: This is also a comment
batchCopy codeSET variable_name=value ECHO %variable_name%
batchCopy codeSET /P variable_name=Enter input:
batchCopy codeIF condition command IF NOT condition command IF condition ( command1 command2 ) ELSE ( command3 command4 )
batchCopy codeFOR %%parameter IN (set) DO command
batchCopy code:loop IF condition ( command GOTO loop )
batchCopy codeCOPY source_file destination_file DEL file_name MKDIR directory_name RMDIR directory_name
batchCopy code:label_name REM Commands GOTO :EOF
REM To call the subroutine CALL :label_name
batchCopy code@ECHO OFF IF %ERRORLEVEL% NEQ 0 ( ECHO An error occurred. )
batchCopy codeCLS (Clear screen) PAUSE (Pause execution) TIMEOUT /T seconds (Pause for specified seconds) EXIT (End batch file execution)
Remember, this is a basic overview. Batch scripting allows for various functionalities and can get more complex with additional commands and features.
Feel free to explore and experiment further with these commands to enhance your batch scripting skills!