How to Copy Files Using Command Prompt on Windows 11

First, note down the file location

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • To copy files using Command Prompt on Windows 11, open CMD as administrator and run the copy command.
  • Keep reading to learn the detailed steps!
Copy Files Using Command Prompt on Windows 11

Copying files using Command Prompt on Windows 11 can be a convenient option to manage your files, especially when you want precise control over the process, like preserving file attributes or copying hidden or system files.

This guide will discuss essential commands with step-by-step instructions to guide you through the seamless process.

How do I copy files with Command Prompt on Windows 11?

Before proceeding with any steps to copy a file to a directory, go through the following:

  • Ensure you have logged in via a user account with administrator rights.
  • Note down the file name and location of the file.
  1. Press the Windows key, type cmd, and click Run as administrator to open Command Prompt.CMD elevated - Copy Files Using Command Prompt on Windows 11
  2. Copy & paste the following command after replacing the File-Path with path, FileName with the name of the file, & DriveLetter with the destination drive and hit Enter: Copy "File-Path" DriveLettercmd_copy file from one drive - Command Prompt Windows 11
  3. You can also copy the file from one drive to another in a specific folder, and in that case, use the following command after replacing File-Path with the file’s path & DestinationFolderPath with the path of the folder in a different drive: Copy "File-Path" DestinationFolderPath
  4. You will get 1 file (s) copied message once the command is executed.
  5. If you want to copy multiple files with specific file extensions from one drive to another, you can use wildcards (*).
  6. Type the following command after replacing the .TXT with the file extension & DriverLetter with the destination drive and press Enter: copy *.txt DriveLetter

If you are copying files from the USB drive, and it doesn’t allow you cause it is write-protected, follow this guide to find detailed solutions.

How do I copy multiple files in CMD?

  1. Press Windows>type cmd>Run as administrator.
  2. Copy & paste the following command to copy all folders and subfolders with their content after replacing SourceFolderPath with the current path of the folder & DestinationFolderPath with the new one and hit Enter: Xcopy "SourceFolderPath" DestinationFolderPath /E /H /C /Icmd_COPY FILES IN WINDOWS 11 USING COMMAND PROMPT
    • /E โ€“ Copies all the subfolders, even the empty ones.
    • /H โ€“ Copies hidden files or files with system file attributes
    • /C โ€“ Keeps copying, even if error is encountered
    • /I โ€“ Resumes the destination is a directory if it doesnโ€™t exist

Once the command is executed, you will get a confirmation message; however, if you get the XCOPY Access Denied error, read this guide to find solutions.

How can I delete a folder or file in Command Prompt?

  • Press Windows>type cmd>Run as administrator.
  • Type the following command after replacing FolderPath with the path of the folder and hit Enter: del "FolderPath"

Why can’t I copy files in Windows 11?

  • Insufficient file permissions
  • The file is already open or is in use.
  • The file or folder is Read-only.
  • System files are corrupted.

Now that you know the reasons, check out this knowledgeable guide to quickly fix the Copy-Paste not working issue on a Windows computer.

Now that you know how copying works, you can easily configure your PC to automatically copy files from one folder to another.

Stuck somewhere while following the steps? Feel free to mention your queries in the comments section below.

More about the topics: command prompt, Windows 11