Question

Difficulty: MediumMicrosoft Command-Line Tools

A desktop technician is preparing to migrate a user's data folder to a remote network share over a VPN connection that occasionally experiences brief interruptions. The technician needs a command-line tool that will copy all files and subdirectories—including empty ones—preserve NTFS security permissions, and resume the transfer automatically if the network drops. Which command-line utility and switch combination should the technician use?

  1. robocopy C:\Data \\Server\Share /e /copyall /zAnswer
  2. B
    xcopy C:\Data \\Server\Share /s /h /r
  3. C
    cp -r -p C:\Data \\Server\Share
  4. D
    compmgmt.msc /copy C:\Data \\Server\Share

Answer

The command 'robocopy C:\Data \\Server\Share /e /copyall /z' correctly copies all subdirectories including empty ones, preserves full NTFS file permissions, and operates in restartable mode for unreliable network connections.
Robocopy (Robust File Copy) is the recommended Windows command-line utility for copying large volumes of data over network paths. The /e parameter copies all subdirectories including empty ones, /copyall copies all file information (including NTFS owner, audit, and ACL permissions), and /z enables restartable mode, allowing interrupted transfers over unstable network connections to resume without starting over.

Step-by-Step Solution

1
Identify the primary requirement for file copy resilience over an unreliable network
Recognize that 'robocopy' (Robust File Copy) is preferred over standard copy/xcopy for network transfers due to its built-in resume features.
Standard utilities like 'copy' or 'xcopy' fail or require a full restart if a network socket drops midway through a large transfer.
2
Evaluate the required switches for directory structure, permissions, and network stability
Determine that '/e' copies subdirectories (including empty ones), '/copyall' duplicates NTFS security permissions, and '/z' enables restartable mode.
Matching all scenario requirements ensures zero data loss and proper access rights on the target network share.

Key Concept

Microsoft Command-Line Tools - Robocopy File Transfer Switches
Estimated Time:1m 15s
Rate this question