In MS-DOS, which command moves a file from one directory to another (optionally renaming it at the destination)?
-
AMOVE
-
BCOPY
-
CRENAME
-
DCP
-
ENone of the above
Answer
Correct Answer: MOVE
Explanation
Introduction / Context:Relocating files between directories is a routine administrative task. While copying duplicates data, moving transfers the file to a new path and removes the original, saving space and keeping a single, authoritative copy.
Given Data / Assumptions:
- Source and destination directories exist and are writable.
- User wants to relocate, not duplicate, the file.
- MS-DOS MOVE utility is available (included in later DOS versions and Windows DOS boxes).
Concept / Approach:The MOVE command changes a file’s directory entry to the target location, performing a rename across paths (and physically copying then deleting if required across volumes). COPY leaves the original in place; RENAME changes the name within the same directory only. CP is a UNIX command, not DOS.
Step-by-Step Solution:
1) To move REPORT.TXT from C:\WORK to C:\ARCHIVE, run: MOVE C:\WORK\REPORT.TXT C:\ARCHIVE\2) Verify the file appears in the destination with DIR C:\ARCHIVE3) Confirm it is no longer present in the source directory.4) Optionally rename while moving: MOVE REPORT.TXT ARCHIVE\REPORT_OLD.TXTVerification / Alternative check:Attempting the same operation with RENAME across directories fails, confirming that MOVE is required for cross-directory relocation.
Why Other Options Are Wrong:
- COPY: Duplicates without deleting the source.
- RENAME: Renames in-place within one directory.
- CP: Not a DOS command.
- None of the above: Incorrect because MOVE is correct.
Common Pitfalls:Forgetting to include a trailing backslash on the destination directory or omitting quotes when paths contain spaces in later DOS shells.
Final Answer:MOVE