Difficulty: Easy
Correct Answer: DIR/B
Explanation:
Introduction / Context:
The DIR command is the primary tool for listing files in MS-DOS. It supports several switches to control formatting and recursion. For scripting and quick checks, technicians often need a concise “bare” list of names only, without extra metadata that clutters output or complicates parsing.
Given Data / Assumptions:
Concept / Approach:
DIR /B produces “bare” listings—only names. DIR /W shows wide format but still includes header/footer information and is not as minimal as /B. DIR /S recurses into subdirectories, producing verbose output. DIR A: merely targets the A: drive and does not alter formatting. Thus, /B is the precise switch for name-only lists, useful in batch files and redirection to text files.
Step-by-Step Solution:
Verification / Alternative check:
Running DIR /B > list.txt creates a clean list of names suitable for scripts, demonstrating the intended behavior.
Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
DIR/B.
Discussion & Comments