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.
You should read it
- How to use the command history function in Command Prompt
- Add Command Prompt to Power User Menu on Windows 10
- How to open Command Prompt on Windows 10, 8, 7, Vista and XP
- How to Make Command Prompt Appear at School
- 6 Best Command Prompt Alternatives for Windows
- How to use Xcopy command in Command Prompt
- Instructions for using Command Prompt
- All Frequency Restart, Shutdown, Remote Off ... with Command Prompt
- Windows prompt
- How to Customize the Font in Windows Command Prompt
- How to Unblock Command Prompt Anywhere
- How to Create a Custom Windows Command Prompt