How to Use Xcopy on Windows 11 for Copying Files/Folders

How to use Xcopy on Windows 11 for file/folder copy from one location to another? Read this guide to get commonly used Xcopy switches and options, a how-to-use guide, and a free Xcopy alternative with a user-friendly GUI.


By Jonna Updated on November 8, 2023

Share this: instagram reddit

Does Xcopy Work on Windows 11?

Xcopy is a command-line tool that is used for copying files and directories from one location to another. This utility is built into all Windows operating systems including Windows 11.

With this tool, you can copy multiple files or copy folders and subfolders, from one place to another in Windows. Also, you can use this command to transfer large amounts of data between computers via network connections. Notably, Xcopy excels in safeguarding crucial file attributes like timestamps, permissions, and ownership during the copying operation. Now, let’s delve into some frequently used Xcopy switches and how to use Xcopy on Windows 11.


Commonly-Used Xcopy Switches

Xcopy boasts a rich array of options and switches at your disposal. The basic syntax of Xcopy command is: xcopy source [destination] [/options]. This command copies all the files and subdirectories from the specified source to the designated destination. When tasked with transferring a single file from one location to another, simply specify the source file's path, the file name, and the desired destination path. And here are some common Xcopy options:




This parameter specifies the location and names of the files you want to copy. Essential components include a drive or a path.


It specifies the destination for the files you wish to duplicate. This parameter can include a drive letter and colon, a directory name, a file name, or any combination thereof.


Copies directories and subdirectories, unless they're empty. If you omit /s, Xcopy works within a single directory.


Copies all subdirectories, including those without content. Usually, use /e with the /s and /t command-line options.


Displays source and destination file names during the copying process.


Suppresses prompting to confirm that you want to overwrite an existing file at the destination.

For more Xcopy parameters or switches, you can go to the Microsoft Xcopy page for more information.

How to Use Xcopy on Windows 11 for Copying Files/Folders

It is available to use Xcopyon Windows11 in Powershell or Command Prompt to copy files and folders. Here's a concise guide on how to harness its capabilities:

Step 1. Click Start and type cmd in the Windows 11 search box.

Step 2. Locate Command Prompt in the search results, right-click on it, and choose Run as administrator.

Step 3. Type your specific Xcopy Windows 11 command line to copy files/folders as needed. The following are some Xcopy examples.

👉Xcopy example 1: For copying a file from one location to another, just mention the source path with the file name and the destination path where the file you wish to copy, such as:

  • xcopy 'C:\OutPut\AZ-400_StudyGuide_ENU_FY23Q1.0.pdf' C:\Books /E

Xcopy PDF

👉Xcopy example 2: To Xcopy all files and folders, including subdirectories, like from C:\OutPut to C:\Books, use the command: xcopy C:\OutPut C:\Books /E.

Xcopy E Switches

👉Xcopy example 3: To copy folders and subfolders and contents, like copying the "test" folder and its subfolders from C drive to D drive, type Xcopy command as: Xcopy C:\test D:\test /E /H /C /I.


Why is Xcopy on Windows 11 not Working?

More than one user has reported that Windows 11 Xcopy is not working on the system and meets issues like Xcopy does not copy all files, Xcopy unable to create directory, etc. Here are some common troubleshooting tips to help you identify and resolve the problem.

  • Check Command Syntax: Ensure that you are using the correct syntax for the Xcopy command. Review your command to make sure there are no typos or mistakes in the parameters you've provided.
  • File Paths: Verify that the source and destination paths are correctly specified and exist. If either the source or destination path contains spaces, it should be enclosed in double quotes.
  • Permissions: Ensure that you have the necessary permissions to read from the source directory and write to the destination directory. Administrative privileges may be required for certain operations.
  • Drive Letters: Make sure that drive letters and paths are correctly mapped. If you're working with network drives or mapped network locations, ensure that they are properly connected.
  • Quotation Marks: If your file paths or directories contain spaces, be sure to enclose them in double quotation marks.

Better Free Way to Copy Files and Folders (Easier and No Error)

If you think that finding the correct Xcopy switches is difficult or fixing Xcopy command on Windows 11 is time-consuming, you can turn to using the free Xcopy alternative - AOMEI Backupper Standard to copy files/folders effortlessly.

🚀File Backup/Sync: You can sync or backup files to various destinations, including network drive, external disk, USB flash drive, SD card, NAS, cloud drive, etc, allowing for easy file transfer from one computer to another.
🚀Automated Sync: It can automate data synchronization, which syncs data changes frequently (daily/weekly/monthly), saving you repetitive work.

Download and install the freeware first and then follow the graphic tutorial below to learn how to copy files easily using its Basic Sync function:

Download Freeware Win 11/10/8.1/8/7/XP
Secure Download

Step 1. Launch this AOMEI Backupper software and click Sync > Basic Sync.

File Sync

★Notes: Basic Sync facilitates one-way synchronization from the source location to the destination path. For more advanced synchronization options, consider upgrading to the Pro version, which includes:
Real-Time Sync: This enables real-time synchronization of modified files from the source to the destination directory.
Two-Way Sync: Keeps both source and destination directories in sync, updating either side with changes made on the other.
Mirror Sync: Creates an exact replica of files, ensuring that files in the destination remain identical to the source.

Step 2. Assign a distinctive name to your task for easy identification. Select the folder you intend to copy by clicking Add Folder. You can include multiple folders by clicking the + button.

Add Folder

Step 3. In the second column, utilize the inverted triangle button to specify the destination location. This can be a network location, local disk, external hard drive, or a cloud drive.

Select- Sync Destination

Step 4. Once your source and destination folders are configured, click the Start Sync button to initiate the file copy operation.

Start Sync

>> Options - Within this section, you have the capability to include comments that document the specific contents of your sync task. Furthermore, you can opt to enable email notifications for tasks.

Sync Settings

>> Schedule Sync - This feature empowers you to set up the sync task to run at specified intervals, such as daily, weekly, monthly, event trigger, or USB plug in. The last option can help you auto copy files when USB is connected.

Schedule Settings


This article mainly introduces some Xcopy switches and how to use Xcopy on Windows 11 for file/folder sync. While Xcopy proves to be a potent synchronization tool, its command line interface can pose challenges for users who are not computer savvy. Therefore, we also recommend a simpler file copy tool, AOMEI Backupper Standard, for you.

AOMEI Backupper Standard extends beyond file synchronization, offering a comprehensive suite of features including cloning, backup, and data restoration, ensuring complete data and computer protection. With this versatile utility, you can effortlessly clone SD card to larger card with a few simple clicks.

What’s more, if you are a server user, it provides AOMEI Backupper Server to help you backup data on server system. For instance, you can image Windows Server 2012 to new hard drive for system recovery.

Jonna · Editor
Jonna joined AOMEI in 2021 and has become a professional in the areas of computer backup and restoration, disk cloning, file synchronization, etc. She maintains a keen eye for the latest technology trends, ensuring that the information provided is always in step with industry developments.