Batch Scripting Commands Guide
ECHO
Description: Displays messages or turns command echoing on/off.
Example: ECHO Hello, World!
CLS
Description: Clears the screen.
Example: CLS
PAUSE
Description: Pauses the execution of a batch file and displays a message.
Example: PAUSE
REM
Description: Inserts comments in a batch file.
Example: REM This is a comment
SET
Description: Sets or displays environment variables.
Example: SET PATH=C:\Windows\System32
IF
Description: Performs conditional processing in batch programs.
Example: IF EXIST file.txt ECHO File exists
FOR
Description: Loops through a set of files or values.
Example: FOR %%i IN (file1 file2) DO ECHO %%i
GOTO
Description: Directs the command interpreter to a labeled line in the batch program.
Example: GOTO END
:END
ECHO Script Ended
CALL
Description: Calls another batch file and returns to the current file.
Example: CALL otherfile.bat
START
Description: Starts a separate window to run a specified program or command.
Example: START notepad.exe
EXIT
Description: Exits the command interpreter.
Example: EXIT
TITLE
Description: Sets the title for the command prompt window.
Example: TITLE My Batch Script
COLOR
Description: Changes the console's foreground and background colors.
Example: COLOR 0A
CHDIR (CD)
Description: Displays the current directory or changes directories.
Example: CD \path\to\directory
DEL (ERASE)
Description: Deletes one or more files.
Example: DEL file.txt
COPY
Description: Copies one or more files to another location.
Example: COPY file.txt C:\backup\
XCOPY
Description: Copies files and directory trees.
Example: XCOPY source destination /E
MOVE
Description: Moves files and renames files or directories.
Example: MOVE file.txt C:\newfolder\
MKDIR (MD)
Description: Creates a new directory.
Example: MD newfolder
RMDIR (RD)
Description: Removes a directory.
Example: RMDIR foldername