A batch file is a kind of script file in DOS, OS/2 and Windows. It consists of a series of commands to be executed by the command line interpreter, stored in a plain text file.
|Filename extension:||.bat, .cmd, .btm|
|Internet media type:||application/bat, application/x-bat, application/x-msdos-program, text/plain|
|Type of format:||Scripting|
Creating a batch file?
1. Launch CMD. Press the WIN key + R (Windows XP to present) then type CMD.
2. Make or create a directory. MD [LASTNAME], press Enter.
3. Display directory. DIR/OD, press Enter.
4. Change directory. CD [LASTNAME], press Enter.
5. Create batch file ACC.BAT. Creating a batch file in Windows XP is just by typing EDIT ACC.BAT. But that is not the case in higher Windows versions, say Windows 8.1, we have to use the Notepad. Instead the EDIT command, we launch Notepad: notepad.exe acc.bat.
Using selected ASCII codes for the exercise:
6. Save the file by pressing CTRL -S.
7. Run the batch file to display the output.