Difficulty: Easy
Correct Answer: The PATH statement
Explanation:
Introduction / Context:
When you type a command in DOS, the command interpreter (COMMAND.COM) follows a defined search order to find the executable. Knowing how PATH works is crucial for troubleshooting “Bad command or file name” errors and organizing tools across directories.
Given Data / Assumptions:
Concept / Approach:
After checking for an internal command or a program in the current directory, DOS consults the PATH environment variable. PATH lists directories to search (in order) for .COM, .EXE, and .BAT files. CONFIG.SYS and AUTOEXEC.BAT are configuration/startup files, not places to search; they may define PATH but are not searched per-command.
Step-by-Step Solution:
Verification / Alternative check:
Use the SET command to view PATH; temporarily remove a directory from PATH and observe that commands in that directory become unavailable unless referenced with a full path.
Why Other Options Are Wrong:
C:\DOS\UTILITIES: might be a directory in PATH but is not universally searched unless in PATH. Config.sys / Autoexec.bat: not part of per-command search; they simply set environment.
Common Pitfalls:
Assuming DOS searches the entire drive automatically; relying on full paths for every command instead of maintaining PATH correctly.
Final Answer:
The PATH statement
Discussion & Comments