220-802 · Question #471
Which of the following commands is used to duplicate a directory from one location to another?
The correct answer is C. XCOPY. XCOPY is the command-line tool designed to copy entire directory trees, including subdirectories and their contents, from one location to another.
Question
Which of the following commands is used to duplicate a directory from one location to another?
Options
- AMOVE
- BCOPY
- CXCOPY
- DEDIT
How the community answered
(17 responses)- A6% (1)
- C88% (15)
- D6% (1)
Why each option
XCOPY is the command-line tool designed to copy entire directory trees, including subdirectories and their contents, from one location to another.
The MOVE command relocates files or directories from one location to another but removes them from the source, so it does not duplicate - it transfers.
The COPY command duplicates individual files but does not natively copy entire directory trees with subdirectories without additional switches.
XCOPY is an extended copy command that supports copying entire directory structures with the /S or /E switches, replicating folders and their subdirectories to a new destination. Unlike the basic COPY command, XCOPY was specifically designed for duplicating directories rather than individual files. It has been a standard Windows command-line utility for bulk file and directory duplication since early versions of DOS and Windows.
EDIT is a command-line text editor used to open and modify text files, not a file or directory management command.
Concept tested: Windows CLI directory duplication using XCOPY
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy
Topics
Community Discussion
No community discussion yet for this question.