How to Copy Files in Command Prompt

Prepare before copying

How to Copy Files in Command Prompt Picture 1

Determine the location of the file. You need to know the file's location - also known as the path - so Command Prompt knows where to find the file.

You can find the file's path by going to the file's location in File Explorer and clicking the path bar near the top of the window.

Most files have the following path: [Drive name]:Users[User name] (For example "C:UsersKhanh"). This is the path to the location where most files created by computer users are saved.

The file saved on the computer screen related to the above example will be "C:UsersKhanhDesktop", while the file in the Documents folder will have the path "C:UsersKhanhDocuments"

How to Copy Files in Command Prompt Picture 2

Remember file names. If you want to copy a file, you need to know the name of the file. Note, file names in Command Prompt are case sensitive, so you need to enter the exact spelling of each character.

How to Copy Files in Command Prompt Picture 3

Open Start by clicking the Windows icon in the bottom left corner of the screen.

How to Copy Files in Command Prompt Picture 4

Type command promptto find the Command Prompt program on your computer.

How to Copy Files in Command Prompt Picture 5

Click Command Prompt at the top of the Start window to open this program.

Note, you cannot access Command Prompt if you are using a shared computer (such as a computer at school or in a public place).

Copy files

How to Copy Files in Command Prompt Picture 6

Enter the command "change path". Type cdin a space, but don't press it ↵ Enterright away.

How to Copy Files in Command Prompt Picture 7

Enter the path of the file. This is the step to enter the path to the file to copy.

How to Copy Files in Command Prompt Picture 8

Click ↵ Enterto ask Command Prompt to access the path you just entered.

How to Copy Files in Command Prompt Picture 9

Enter the "copy" command by typing copyand a space, but don't rush to press ↵ Enter.

How to Copy Files in Command Prompt Picture 10

Enter a file name. You will enter the file name followed by a space, don't forget to enter the file extension (such as .txtfor text files). Do not press ↵ Enterafter this step.

If there are spaces in the file name, you need to enclose the space in quotation marks. For example, the file name "Bai tap Toan.txt" will become Bai" "tap" "Toan.txtin Command Prompt.

How to Copy Files in Command Prompt Picture 11

Enter the path to the destination folder. Enter another path (such as C:Users[tên của bạn]Desktop) of your choice to save the file to copy.

If you don't do this, the file will be copied to the user folder (e.g. "C:Users[your name]") by default.

How to Copy Files in Command Prompt Picture 12

Press ↵ Enter. This will copy the file to the specified directory. You can view the copied file by accessing the folder from File Explorer on your computer.

Copy the folder's data

How to Copy Files in Command Prompt Picture 13

Access the path to the folder. Type cdin a space, then enter the path to the folder and press ↵ Enter.

For example, if you want to copy all the files in the "Example" folder saved on your desktop, you would enter it C:UsershumpbDesktophere.

How to Copy Files in Command Prompt Picture 14

Enter command robocopy. Type robocopyin a space, but don't rush to press ↵ Enter.

How to Copy Files in Command Prompt Picture 15

Enter a folder name. Type the name of the folder you want to copy, then add a space. Again, don't rush to press ↵ Enter.

Similar to file names, spaces in folder names must be enclosed in quotation marks.

How to Copy Files in Command Prompt Picture 16

Enter the destination folder. Type the path to where you want to save the copied data.

If the root folder has many files, copying those files to another folder that already has a lot of data will make you confused because you cannot copy the original folder.

How to Copy Files in Command Prompt Picture 17

Press ↵ Enter. This will copy the original folder's data to another specified folder.

4 ★ | 2 Vote

May be interested

  • How to open Command Prompt on Windows 10, 8, 7, Vista and XPHow to open Command Prompt on Windows 10, 8, 7, Vista and XP
    command prompt is one of the command line interface programs used to execute commands in the windows operating system. the article will guide you how to open command prompt on windows 10, 8, 7, vista and xp.
  • How to Make Command Prompt Appear at SchoolHow to Make Command Prompt Appear at School
    this wikihow teaches you how to access command prompt on a windows 10 school computer. although you may be able to open command prompt if only the file path to command prompt is blocked, there is no way to bypass an administrator lock on...
  • 6 Best Command Prompt Alternatives for Windows6 Best Command Prompt Alternatives for Windows
    do you find the command prompt a bit complicated and feel you need a tool that is easier to use? this is where other terminal emulators come into play!
  • 6 Cool Tricks You Can Do in Windows Command Prompt6 Cool Tricks You Can Do in Windows Command Prompt
    command prompt has a ton of capabilities, and many people doubt they know what a few lines of code can do. next time you're bored with your pc, try these cool command prompt tricks for yourself.
  • Instructions for using Command PromptInstructions for using Command Prompt
    deep in windows is a command-line world that is obscure. in this article, we will show you how to solve errors and make your computer more secure.
  • All Frequency Restart, Shutdown, Remote Off ... with Command PromptAll Frequency Restart, Shutdown, Remote Off ... with Command Prompt
    often users often turn off the computer, restart the computer ... using the shutdown options on the start menu. however, few of us know that using command prompt can also shutdown, restart the computer, schedule a computer shutdown or enable hibernation, ... and even if you have admin rights you can turn off other computers remotely.
  • Open folder in Command Prompt (CMD)Open folder in Command Prompt (CMD)
    do you need to access a certain folder from the command prompt or windows command prompt? although it looks classic, this program is really easy to use if you know some basic commands. today's tipsmake will show you how to use the 'cd' command to open a folder in windows command prompt. besides, you will also learn great tips to immediately open the command prompt in any folder on windows file explorer.
  • Tips to burn ISO file from Command Prompt on Windows 10Tips to burn ISO file from Command Prompt on Windows 10
    windows 10 also allows users to burn iso files without having to use any 3rd party software or tools. actually burning iso files doesn't need to use the first integrated third tool on windows 7. all you need is a blank cd / dvd and iso file.
  • Windows promptWindows prompt
    the prompt command changes the command prompt cmd.exe file.
  • How to Customize the Font in Windows Command PromptHow to Customize the Font in Windows Command Prompt
    many people work regularly with the windows command prompt. one of the main problems users encounter, however, is the difficulty of achieving the same look every time one works with the command prompt interface. this article is intended to...