The Xcopy Command
When basic copy isn't enough, xcopy (Extended Copy) steps in. It's designed to copy directories, subdirectories, and even file attributes. It's the workhorse of simple backups before you graduate to robocopy.
Usage:xcopy
[source]
[destination]
[/s]
[/e]
/s
Copies directories and subdirectories except empty ones.
/e
Copies directories and subdirectories, including empty ones.
/y
Suppress overwrite prompts.
/d
Copies files specific date or newer.
Real-World Examples
Backup a folder tree:
Command Prompt
C:\Users\User>xcopy C:Docs D:BackupDocs /s /e
Knowledge Check
1 / 2What is the main difference between copy and xcopy?