In MS-DOS, batch files are scripts that run a sequence of commands automatically. Which filename extension identifies a batch file?

Difficulty: Easy

Correct Answer: BAT

Explanation:


Introduction / Context:
Batch files provide automation in DOS by executing a list of commands in order. They are frequently used to set environment variables, launch programs, or perform maintenance tasks during boot or login. Recognizing their file extension is fundamental for DOS administration and scripting.


Given Data / Assumptions:

  • We are identifying the standard file extension for batch scripts in DOS.
  • Other common DOS extensions include .COM (command binaries), .EXE (executables), and .SYS (device drivers).


Concept / Approach:

By convention, DOS batch scripts use the .BAT extension (e.g., AUTOEXEC.BAT). When executed, the command processor (COMMAND.COM) reads and runs commands from the file sequentially. This is distinct from compiled programs (.EXE, .COM) and system drivers (.SYS).


Step-by-Step Solution:

List common DOS extensions and their roles.Recall that scripts are .BAT.Eliminate non-script extensions.Select 'BAT' as correct.


Verification / Alternative check:

Any DOS reference or system files on boot disks (e.g., AUTOEXEC.BAT) confirm this association.


Why Other Options Are Wrong:

  • .COM/.EXE: compiled executables, not batch scripts.
  • .SYS: device/system driver files loaded typically in CONFIG.SYS.


Common Pitfalls:

  • Confusing AUTOEXEC.BAT (batch) with CONFIG.SYS (configuration directives).


Final Answer:

BAT.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion