Question

Difficulty: EasyBasic Scripting Languages and Constructs

A helpdesk technician needs to create a simple script that executes native Windows Command Prompt (cmd.exe) commands to automate workstation login tasks. Which file extension should be assigned to this script?

  1. .batAnswer
  2. B
    .ps1
  3. C
    .sh
  4. D
    .vbs

Answer

The .bat extension is used for standard Windows Batch scripts running in the Command Prompt (cmd.exe).
The .bat extension designates a batch file composed of sequential command-line directives designed to be parsed natively by the Windows Command Prompt (cmd.exe).

Step-by-Step Solution

1
Identify the target command environment specified in the scenario.
The scenario requires executing native Windows Command Prompt (cmd.exe) commands.
Script file extensions dictate which interpreter or execution host Windows uses to run the file.
2
Match the Windows Command Prompt environment to its proper file extension.
Windows batch files use the .bat file extension.
The Windows Command Prompt natively interprets and executes files saved with the .bat (or legacy .cmd) extension.

Key Concept

Scripting File Extensions and Runtimes
Rate this question