How to Copy Files Using Command Prompt on Windows 11

By
Ajoy Kumar
He is a prominent tech writer with over six years of experience and the founder of TheCoderWord. He delivers high-quality content revolving around troubleshooting and how-to...
5 Min Read
Disclosure: This site uses affiliate links. We may earn a commission at no extra cost to you. Thanks for your support!
How to Copy Files Using Command Prompt on Windows 11
Quick Tips
  • Double-check file and folder paths before pressing Enter, as Command Prompt executes commands instantly with no undo option.
  • Run Command Prompt as Administrator when working with system folders to avoid “Access denied” errors.
  • Use built-in help commands like copy /?, xcopy /?, or move /? to view available options and switches.

Most of the time, copying files on Windows 11 is as simple as drag and drop. But when File Explorer freezes, a folder refuses to open, or you’re dealing with large batches of files, the Command Prompt can be faster, more reliable, and surprisingly powerful.

In this guide, we’ll walk you through how to copy files using Command Prompt on Windows 11, explain the most useful commands, and show practical examples so you can confidently move data without relying on the graphical interface.

How to Copy Files Using Command Prompt

In this section, we’ll walk you through how to copy both single and multiple files using Command Prompt. Before running any copy or move command, you first need to navigate to the correct directory.

You can do this using the cd command followed by the folder name. For example, typing cd folder_name and pressing Enter will move you into that folder.

If the files are located on a different drive, simply type the drive letter followed by a colon (for example, E:) and press Enter. This switches the working directory to the selected drive. Once you’re in the correct location, you’re ready to copy your files.

1. Copy a Single File

The COPY command is the simplest way to copy an individual file from one location to another. Here’s how to use it:

1. Click Start, type cmd, and select Command Prompt from the search results.

2. If you’re working with protected locations (such as system folders), right-click Command Prompt and choose Run as administrator.

Open CMD

3. Once Command Prompt opens, run the following command:

copy source destination

For example, if you want to copy the file note.txt from C:\Users\ajoyk\Documents to the D:\Notes folder, use:

copy C:\Users\ajoyk\Documents\note.txt D:\Notes
Copy Files Using Command Prompt

Or, if you’re already inside the source folder:

copy note.txt D:\Notes
Copy Files Using CMD

The file will be copied instantly to the new location. If a file with the same name already exists in the destination folder, Command Prompt will ask whether you want to overwrite it.

2. Copy Multiple Files

To copy multiple files or entire folders, you can use the XCOPY command. The basic syntax looks like this:

xcopy source destination [options]

For example, to copy all files and subfolders from C:\Users\ajoyk\Documents\SamplePaper to\ D:\Notes, use the following command:

xcopy C:\Users\ajoyk\Documents\SamplePaper D:\Notes /E /I
Copy All Files into Another using CMD

Here’s what these options mean:

  • /E copies all subfolders, including empty ones
  • /I assumes the destination is a folder if it doesn’t already exist

If you want to explore more options and advanced switches, type copy /? or xcopy /? in Command Prompt. This displays detailed help and explains all available parameters you can use in different scenarios.

How to Move Files Using Command Prompt

Now let’s see how you can move files or folders using Command Prompt. Windows provides the move command for this purpose, and the basic syntax looks like this:

move source destination

For example, if you want to move the note.txt file from C:\Users\ajoyk\Documents to the D:\Notes folder, you would run:

move C:\Users\ajoyk\Documents\note.txt  D:\Notes
Move Files and Folder Using CMD

Once you press Enter, the folder is moved instantly to the new location.

If you want to explore additional options and switches supported by this command, type move /? in Command Prompt. This displays built-in help along with usage examples.

Things to Keep in Mind While Copying and Moving Files

When copying or moving files using Command Prompt, remember that commands execute immediately, there’s no undo option. Because of this, it’s always a good idea to double-check the source and destination paths before running the command.

If a file or folder name contains spaces, make sure to wrap the full path in quotation marks. Also, if you run into Access Denied errors, opening Command Prompt with administrator privileges usually fixes the problem.

Want to see more helpful guides like this? Add thecoderworld as your preferred source on Google so our content appears more often in your feed.

Share This Article
Follow:
He is a prominent tech writer with over six years of experience and the founder of TheCoderWord. He delivers high-quality content revolving around troubleshooting and how-to guides for Windows, Linux, macOS, Chrome, and more.
Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *