nerdexam
GIAC

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.

File System & Registry Forensics

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)
  • A
    6% (4)
  • B
    13% (8)
  • C
    3% (2)
  • D
    78% (50)

Why each option

The XCOPY /s switch copies directories and subdirectories containing files, preserving the file structure during the copy operation.

A/o

/o copies file ownership and access control list (ACL) information to the destination, not general file attributes.

B/p

/p prompts the user for confirmation before creating each destination file and does not affect attribute handling.

C/k

/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.

D/sCorrect

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

#XCOPY#file attributes#Windows commands#command switches

Community Discussion

No community discussion yet for this question.

Full GCFA Practice