Difficulty: Easy
Correct Answer: DELTREE
Explanation:
Introduction / Context:In DOS, deleting a directory tree recursively can be tedious if done file-by-file. DOS introduced a command to remove an entire directory and everything beneath it, simplifying cleanups and uninstalls.
Given Data / Assumptions:
Concept / Approach:
DELTREE performs recursive deletion from the specified path downward. It prompts for confirmation unless overridden by switches. This is distinct from DEL (which deletes files) and RD (which removes only empty directories).
Step-by-Step Solution:
At the prompt, type DELTREE path (for example, DELTREE C:\OLDAPP).Confirm the prompt to proceed with recursive removal.Wait for the command to remove files and subdirectories.Verify with DIR that the directory no longer exists.Optionally use switches to suppress prompts in scripts (use with caution).Verification / Alternative check:
Attempting RD on a non-empty directory will fail, proving the necessity of a recursive command like DELTREE for bulk removal.
Why Other Options Are Wrong:
a: DEL . deletes files in the current directory only and not subdirectories.
b: RD (RMDIR) removes only empty directories.
d: CD changes the current directory; it does not delete anything.
e: Not applicable because DELTREE is correct.
Common Pitfalls:
Accidentally running DELTREE on the wrong path; always double-check the target and ensure backups exist.
Final Answer:
DELTREE
Discussion & Comments