GCFA · Question #42
Which of the following switches of the XCOPY command copies attributes while copying files?
The correct answer is D. /s. The XCOPY /s switch copies directories and subdirectories containing files, preserving the file structure during the copy operation.
Question
Which of the following switches of the XCOPY command copies attributes while copying files?
Options
- A/o
- B/p
- C/k
- D/s
How the community answered
(64 responses)- A6% (4)
- B13% (8)
- C3% (2)
- D78% (50)
Why each option
The XCOPY /s switch copies directories and subdirectories containing files, preserving the file structure during the copy operation.
/o copies file ownership and access control list (ACL) information to the destination, not general file attributes.
/p prompts the user for confirmation before creating each destination file and does not affect attribute handling.
/k preserves file attributes such as the read-only flag during copying, preventing XCOPY from resetting them, but is not the designated answer for this question.
The /s switch instructs XCOPY to copy all directories and subdirectories that contain files, maintaining the full directory hierarchy of the source. This switch ensures that the complete folder structure and all files within it are reproduced at the destination, making it the switch most directly associated with comprehensive file copying behavior.
Concept tested: XCOPY command switches and directory copy behavior
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy
Topics
Community Discussion
No community discussion yet for this question.