A batch file is simply a text file containing a list of commands. When you run the file, the computer executes the commands in order. It's the simplest form of coding on Windows.
Try the command
Run a batch file!
Build the command
.batStandard extension for batch files.
@echo offCommon first line to hide command clutter.
Terminal
C:\Users\User>backup.bat
Sample Script
daily_backup.bat
@echo off
echo Starting Backup...
xcopy C:\Work D:\Backup /s /y
echo Backup Complete!
pause
Knowledge Check
1 / 2What is the file extension for a batch script?
References
These documentation links provide authoritative details for the commands used in this article.