"Offering free computer help, hints, and tips to the Internet populace." Now with over 3,820 tips!

File Extensions

BAT File Format

SUMMARY: The BAT file format defined. These are batch files for MS-DOS or MS-Windows systems.


 

The ".BAT" file format is a MS-DOS or MS-Windows batch file. In layman's terms, a BAT file contains a series of instructions for the computer to perform, usually for computer or file maintenance.

Without going into too much detail, some common commands you may find inside BAT files include:

COPY - Copies a file, sometimes from one directory to another

CD - Changes focus to a new directory to perform file operations there

DIR - Displays the list of files in the current directory

MD - Creates a new directory

MOVE - Moves a file, usually from one directory to another

RENAME - Renames a file

Just as TXT files, you can open BAT files in Notepad or another text editor. However, make sure you open your text editor first, and THEN open the .BAT file from within that application. This is because double-clicking BAT files usually run their contents as commands.

Since batch files can perform many different tasks, they can either be very useful or malicious in nature. For this reason, be VERY CAREFUL when receiving batch files through e-mail, instant messenger, or other questionable sources.

Windows users: NOTE that unless you have configured your computer with the file extension viewing tweak, it is possible that a filename that looks like it ends with ".bat", especially one attached to an e-mail message, actually has a hidden OTHER extension, meaning that if you double-click the file, it may actually run a computer virus!



 

Got something to add? Post a comment!

Everyone is invited to submit comments. Registered users also receive their own visitor profile page with a summary of recent posts.
Register | Login

Your name:
 E-mail:
* Home/Blog Page:
Comment:
(Max chars: 5000)

* = optional field

 


Print This Tip

Get E-Mail When New Tips are Online

Return to the File Extensions page.

 


New in MalekTips:

RSS Feeds- Subscribe!

You want the latest tech tips and tricks in your e-mail Inbox - FREE? Type your e-mail address below and click 'Get Tips!'.
 


( sample / details )
( opt-out instructions )