How to Copy Files Using Command Prompt on Windows 11

First, note down the file location


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
XINSTALL BY CLICKING THE DOWNLOAD FILE
A message from our partner

Fix Windows 11 OS errors with Fortect:

  • Download Fortect and install it on your PC
  • Launch the tool and Start scanning to find broken files that are causing the problems
  • Right-click on Start Repair to fix issues affecting your computer’s security and performance
Download Now Fortect has been downloaded by 0 readers this month, rated 4.6 on TrustPilot

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 what’s causing the problem, check out this super helpful guide to quickly fix the Copy-Paste not working issue on your Windows PC.

You can also review this guide on how to cut copy and paste using keyboard to make file operations easier while working in Windows 11.

Once you’ve got the hang of how copying works, it’s easy to set things up so your PC can automatically copy files from one folder to another—no extra effort needed.

If something still feels off, it’s worth running a quick virus scan using Command Prompt to rule out anything shady messing with your system. You can check which processes block your files by using this guide to Tasklist and Taskkill commands.

Stuck somewhere while trying the steps? Don’t worry—drop your questions in the comments below and we’ll help you out.

More about the topics: command prompt, Windows 11

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

User forum

0 messages