How To Write A Simple Batch (.bat) File

1 answer

Staff June 5, 2015

1. Open your notepad


2. Write your DOS commands example the below command @ echo off start = will open when you run the bat file.


3. Save your work from notepad in .bat extension from the save as type from the drop down select all files.

creating batch


Here are some of the Important commands


ECHO – Displays text on the screen
@ECHO OFF – Hides the text that is normally output
START – Run a file with it’s default application
REM – Inserts a comment line in the program
MKDIR/RMDIR – Create and remove directories
DEL – Deletes a file or files
COPY – Copy a file or files
XCOPY – Allows you to copy files with extra options
FOR/IN/DO – This command lets you specify files.
TITLE – Edit the title of the window.


Please login or Register to Submit Answer