All Exams Test series for 1 year @ ₹349 only
Question

What is the file extension for batch files?

The correct answer is

.BAT

Understanding Batch File Extensions

Batch files are script files in Microsoft Windows, MS-DOS, OS/2, and related operating systems. They consist of a series of commands to be executed by the command-line interpreter. These files automate sequences of commands that would otherwise be entered manually at the command prompt.

What is the Correct Batch File Extension?

The standard and most common file extension for batch files is .BAT.

When a file with the .BAT extension is executed, the operating system's command processor (like cmd.exe in Windows or COMMAND.COM in MS-DOS) reads the file line by line and executes the commands contained within it.

Analysis of Options

Let's look at the provided options:

  • .BAT: This is the correct and widely recognized file extension for batch files.
  • .BATCH: While related to the concept of batch processing, this is not the standard file extension used by the operating system for executable batch scripts.
  • .BCH: This is not a standard file extension for batch files. It might be used for other types of files depending on specific applications, but not for general command scripts executed by the operating system.
  • .CTH: This is not a recognized file extension for batch files or any common file type.

Therefore, the file extension for batch files is definitively .BAT.

Common Scripting File Extensions
File Extension Description Typical Use
.BAT Batch File Windows/DOS command scripts
.CMD Command Script Windows NT, 2000, XP and later command scripts (similar to .BAT but newer)
.VBS VBScript File Windows scripting using VBScript
.PS1 PowerShell Script Windows PowerShell scripts

Revision Table: Key Concepts

Batch File Key Concepts
Concept Explanation
Batch File A script file containing a series of commands for the command-line interpreter.
File Extension Suffix added to the name of a computer file, indicating the format or type of the file.
.BAT The standard file extension for batch files in Windows and MS-DOS.
Command Processor Software that interprets and executes commands typed by the user or read from a script (e.g., cmd.exe).

Additional Information on Batch Files

Batch files provide a simple way to automate repetitive tasks on Windows systems. They can be used for everything from launching programs with specific settings to performing file operations like copying, moving, and deleting, and managing system configurations. While newer scripting languages like PowerShell offer more power and flexibility, batch files remain relevant for their simplicity and compatibility with older systems.

It's also worth noting that Windows NT introduced the .CMD extension, which serves a similar purpose to .BAT but offers slightly different command handling and features, primarily for command prompt windows (cmd.exe) compared to the older COMMAND.COM used with .BAT files in DOS.

Was this answer helpful?

Important Questions from File Allocation - Teaching

  1. What is called Journaling in Linux operating system?

  2. A magnetic tape drive has transport speed of 200 inches per second and a recording density of 1600 bytes per inch. The time required to write 600000 bytes of data grouped in 100 characters record with a blocking factor 10 is

  3. In a file allocation system, the following allocation schemes are used :

    A. Contiguous

    B. Indexed

    C. Linked allocation

    Which of the allocation scheme(s) given above will not suffer from external fragmentation? Choose the correct answer from the options given below :

  4. _______ stores entries about files and their attributes.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App