How to Copy an Entire Drive in Windows Server 2019 Without Errors Using Robocopy: Solving Long Path, Item Not Found, and File Copy Issues

Copying an entire data drive from one disk to another in Windows Server 2019 appears straightforward until Windows Explorer reaches 99% completion and suddenly displays errors such as "Destination Path Too Long", "Item Not Found", or "Access Denied." These issues become increasingly common when migrating servers, replacing storage devices, upgrading hard disks, or performing full data backups containing hundreds of thousands of files.

Windows Explorer is designed primarily for everyday file operations rather than enterprise-scale data migrations. It struggles with deep folder structures, very long filenames, NTFS permissions, junction points, symbolic links, cloud synchronization placeholders, and corrupted filesystem entries.

Advertisement

For IT administrators, system engineers, managed service providers (MSPs), and enterprise support professionals, Robocopy (Robust File Copy) is Microsoft's recommended utility for copying large amounts of data safely, efficiently, and with detailed logging.

This guide explains why these errors occur, how to solve them permanently, and how to perform a reliable drive-to-drive migration using Robocopy on Windows Server 2019.


Why Windows Explorer Fails at 99%

Many administrators encounter copy failures after several hours of copying because Explorer encounters one or more problematic files.

Typical errors include:

  • Destination Path Too Long
  • Item Not Found
  • Cannot Read Source File
  • Filename Too Long
  • Access Denied
  • Invalid File Name
  • File Currently In Use
  • Cyclic Junction Points
  • Cloud Placeholder Files

Explorer usually stops and waits for user input, making unattended copying impossible.


Understanding the "Destination Path Too Long" Error

Windows traditionally limits file paths to 260 characters (MAX_PATH).

Example:

 
D:\Company\Data\2025\Client Files\Accounting\Salary\
July\Reimbursement\Employee Documents\
Proofs\Active Employees\
Employee Name\Other\Very Long File Name.pdf
 

Although the filename itself may be short, the complete folder hierarchy exceeds Windows' path limit.

When this happens, Explorer displays:

Destination Path Too Long


Why Long Paths Exist

Long paths often occur because of:

  • Multiple nested folders
  • HR document repositories
  • Accounting archives
  • Project documentation
  • Email exports
  • SharePoint downloads
  • Google Drive sync folders
  • OneDrive synchronization
  • ZIP archive extraction

Enable Long Path Support

Windows Server 2019 supports long paths, but the feature is disabled by default.

Enable it using Command Prompt:

 
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
 

or PowerShell:

 
New-ItemProperty `
-Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem `
-Name LongPathsEnabled `
-Value 1 `
-PropertyType DWORD `
-Force
 

Reboot the server after enabling this feature.


Enable via Group Policy

Open:

 
gpedit.msc
 

Navigate to:

 
Computer Configuration

Administrative Templates

System

Filesystem

 

Enable:

 
Enable Win32 Long Paths
 

Restart Windows.


Why "Item Not Found" Appears

Sometimes Windows Explorer reports:

 
Item Not Found

Could not find this item.

 

Possible reasons include:

  • Corrupted directory entry
  • Broken cloud synchronization
  • Deleted during copy
  • Invalid NTFS filename
  • Corrupted filesystem
  • Bad sectors
  • Offline placeholder files

Check the Disk Before Copying

Always scan the drive first.

 
chkdsk D: /scan
 

If errors are detected:

 
chkdsk D: /f
 

Why Robocopy is Better

Robocopy offers numerous enterprise-grade features.

It can:

  • Resume interrupted copies
  • Retry failed files
  • Copy NTFS permissions
  • Preserve timestamps
  • Handle millions of files
  • Use multi-threaded copying
  • Produce detailed logs
  • Skip junction loops
  • Continue despite minor errors

Recommended Robocopy Command

For a full drive copy:

 
robocopy D:\ E:\ /E /COPY:DAT /DCOPY:DAT /MT:32 /R:0 /W:0 /XJ /FFT /TEE /V /LOG:E:\CopyDToE.log
 

Command Breakdown

/E

Copies all folders including empty directories.


/COPY:DAT

Copies:

  • Data
  • Attributes
  • Timestamps

/DCOPY:DAT

Preserves directory timestamps and attributes.


/MT:32

Uses 32 threads for much faster copying.


/R:0

No retries.

Useful when copying millions of files.


/W:0

No waiting between retries.


/XJ

Skips Junction Points.

Prevents endless recursive loops.


/FFT

Compatible with FAT timestamp precision.

Useful across different storage devices.


/TEE

Displays progress on screen while writing the log.


/V

Verbose logging.


/LOG

Creates a detailed copy log.


Should You Use /MIR?

 
/MIR
 

creates an exact mirror.

Advantages:

  • Perfect clone
  • Deletes obsolete files

Disadvantages:

Anything existing on the destination but missing on the source is permanently deleted.

Use only when you fully understand its behavior.


Copy NTFS Security

To preserve permissions:

 
robocopy D:\ E:\ /COPYALL
 

This copies:

  • Data
  • Attributes
  • Timestamps
  • Security ACLs
  • Owner
  • Auditing

Find Extremely Long Paths

PowerShell:

 
Get-ChildItem D:\ -Recurse |
Where-Object {$_.FullName.Length -gt 240} |
Select FullName,
@{Name="Length";Expression={$_.FullName.Length}}
 

Search for Invalid Files

 
Get-ChildItem D:\ -Recurse |
Where-Object {
$_.Name -match '[<>:"|?*]'
}
 

Verify the Copy

Instead of copying again:

 
robocopy D:\ E:\ /L /MIR
 

The /L switch performs a simulation.

If nothing appears, both drives are identical.


Review Copy Errors

After completion:

 
findstr /I "ERROR FAILED" E:\CopyDToE.log
 

This quickly identifies files requiring manual attention.


Best Practices

  • Run Command Prompt as Administrator.
  • Enable Long Path Support before migration.
  • Scan disks using CHKDSK.
  • Avoid Windows Explorer for enterprise copies.
  • Keep antivirus active but exclude temporary log files if necessary.
  • Preserve NTFS permissions when migrating servers.
  • Store Robocopy logs for audit purposes.
  • Verify copied data before deleting the original.
  • Test on a small folder before migrating production data.
  • Keep sufficient free space on the destination drive.

Common Robocopy Exit Codes

Exit Code Meaning
0 Nothing copied; source and destination already match
1 Files copied successfully
2 Extra files exist at destination
3 Files copied and extras found
5 Some files copied with mismatches
6 Extras and mismatches detected
7 Files copied with additional differences
8 or higher Copy errors occurred

Troubleshooting Checklist

✔ Enable Win32 Long Paths

✔ Run CHKDSK

✔ Use Robocopy instead of Explorer

✔ Avoid copying open files

✔ Review Robocopy logs

✔ Skip junction points

✔ Preserve permissions if required

✔ Verify copied data

✔ Compare source and destination

✔ Reboot after enabling Long Paths


Conclusion

Large-scale file migrations on Windows Server 2019 can be challenging due to long path limitations, NTFS permissions, corrupted filesystem entries, and Windows Explorer's inability to handle enterprise-scale copy operations. Robocopy provides a reliable, fast, and fault-tolerant solution that preserves data integrity while minimizing interruptions. By enabling long path support, scanning disks beforehand, using the appropriate Robocopy switches, and reviewing copy logs after completion, administrators can successfully migrate entire drives with confidence and avoid the frustrating 99% copy failures that commonly occur with Windows Explorer.

 

#WindowsServer #WindowsServer2019 #Robocopy #FileCopy #DataMigration #ServerMigration #Backup #WindowsAdmin #SysAdmin #ITSupport #Microsoft #WindowsTips #PowerShell #CMD #NTFS #LongPath #PathTooLong #Storage #DiskClone #ServerBackup #TechGuide #EnterpriseIT #SystemAdministrator #BackupStrategy #FileManagement #Infrastructure #DataRecovery #StorageUpgrade #ITInfrastructure #WindowsExplorer #WindowsCommands #ServerMaintenance #Filesystem #CHKDSK #CopyFiles #MirrorCopy #NetworkAdmin #DataProtection #ServerOptimization #TechTutorial #WindowsTools #CloudMigration #MSP #ITProfessional #ComputerTips #SystemMigration #DataIntegrity #AdminTools #WindowsBackup #Technology

 
 


Windows Server 2019 Robocopy Robocopy command drive copy copy D drive to E drive destination path too long Windows long path enable long paths LongPathsEnabled file copy error Windows Explorer copy problem item not found Robocopy tutorial ser
Advertisement