• About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy Policy
  • Change the purpose of use

Tnhelearning.edu.vn - Various useful general information portal

  • Photo
  • Bio
  • How To
  • Tech

How to Copy Files in Command Prompt

February 16, 2024 by admin Category: How To

You are viewing the article How to Copy Files in Command Prompt  at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.

X

This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

This article has been viewed 48,153 times.

This is an article that shows you how to use the Windows Command Prompt to copy files or folders.

Table of Contents

  • Steps
    • Prepare before copying
    • Copy files
    • Copy data of folder
  • Advice
  • Warning

Steps

Prepare before copying

Image titled Copy Files in Command Prompt Step 1

Image titled Copy Files in Command Prompt Step 1

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/0e/Copy-Files-in-Command-Prompt-Step-1-Version-3.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-1-Version-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/0e/Copy-Files-in-Command- Prompt-Step-1-Version-3.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-1-Version-3.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Specify the location of the file. You need to know the location of the file – aka the path – so that the Command Prompt knows where to look for 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[Username] (eg “C:UsersKhanh”). This is the path to the location where most files created by computer users are saved.
  • The desktop file related to the above example will be “C:UsersKhanhDesktop”, and the file in the Documents folder will have the path “C:UsersKhanhDocuments”
Image titled Copy Files in Command Prompt Step 2

Image titled Copy Files in Command Prompt Step 2

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/7/75/Copy-Files-in-Command-Prompt-Step-2-Version-3.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-2-Version-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/7/75/Copy-Files-in-Command- Prompt-Step-2-Version-3.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-2-Version-3.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Remember the file name. 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.
Image titled Copy Files in Command Prompt Step 3

READ More:   How to Prevent Dogs from Going to the Toilet in the Cage

Image titled Copy Files in Command Prompt Step 3

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/dd/Copy-Files-in-Command-Prompt-Step-3-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-3-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/dd/Copy-Files-in-Command- Prompt-Step-3-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-3-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Open Start

Windows Start

{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

by clicking the Windows icon in the lower left corner of the screen.

Image titled Copy Files in Command Prompt Step 4

Image titled Copy Files in Command Prompt Step 4

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/dd/Copy-Files-in-Command-Prompt-Step-4-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-4-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/dd/Copy-Files-in-Command- Prompt-Step-4-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-4-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Type command prompt to find the Command Prompt program on your computer.
Image titled Copy Files in Command Prompt Step 5

Image titled Copy Files in Command Prompt Step 5

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/44/Copy-Files-in-Command-Prompt-Step-5-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-5-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/44/Copy-Files-in-Command- Prompt-Step-5-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-5-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Click

Windows cmd

{“smallUrl”:”https://www.wikihow.com/images_en/6/66/Windowscmd1.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/66/ Windowscmd1.png/36px-Windowscmd1.png”,”smallWidth”:460,”smallHeight”:383,”bigWidth”:36,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output”: “></div>”}

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

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

Copy files

Image titled Copy Files in Command Prompt Step 6

Image titled Copy Files in Command Prompt Step 6

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/95/Copy-Files-in-Command-Prompt-Step-6-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-6-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/95/Copy-Files-in-Command- Prompt-Step-6-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-6-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the command “change path”. Type cd and a space, but don’t press ↵ Enter right away.
Image titled Copy Files in Command Prompt Step 7

Image titled Copy Files in Command Prompt Step 7

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/09/Copy-Files-in-Command-Prompt-Step-7-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-7-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/09/Copy-Files-in-Command- Prompt-Step-7-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-7-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the path of the file. This is the step to enter the path to the file to be copied.
Image titled Copy Files in Command Prompt Step 8

Image titled Copy Files in Command Prompt Step 8

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/0e/Copy-Files-in-Command-Prompt-Step-8-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-8-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/0e/Copy-Files-in-Command- Prompt-Step-8-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-8-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Press ↵ Enter to ask Command Prompt to access the path you just entered.
Image titled Copy Files in Command Prompt Step 9

Image titled Copy Files in Command Prompt Step 9

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/ee/Copy-Files-in-Command-Prompt-Step-9-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-9-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/ee/Copy-Files-in-Command- Prompt-Step-9-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-9-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Type the command “copy” by typing copy and a space, but don’t rush to press ↵ Enter .
Image titled Copy Files in Command Prompt Step 10

Image titled Copy Files in Command Prompt Step 10

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/eb/Copy-Files-in-Command-Prompt-Step-10-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-10-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/eb/Copy-Files-in-Command- Prompt-Step-10-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-10-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the file name. You will enter the filename followed by a space, do not forget to enter the file extension (such as .txt for text files). Do not press ↵ Enter after this step.

  • If there is a space in the filename, you need to enclose the space in quotes. For example, the filename “Bai tap Toan.txt” will become Bai" "tap" "Toan.txt in Command Prompt.
READ More:   How to Turn a Regular Printer Wireless with a Wi Fi Router
Image titled Copy Files in Command Prompt Step 11

Image titled Copy Files in Command Prompt Step 11

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/e4/Copy-Files-in-Command-Prompt-Step-11-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-11-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/e4/Copy-Files-in-Command- Prompt-Step-11-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-11-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the path to the destination folder. Enter another path (such as C:Users[your name]Desktop ) that you choose to save the file to copy.

  • If this step is not performed, the file will be copied to the user directory (e.g. “C:Users[your name]”) by default.
Image titled Copy Files in Command Prompt Step 12

Image titled Copy Files in Command Prompt Step 12

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/97/Copy-Files-in-Command-Prompt-Step-12-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-12-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/97/Copy-Files-in-Command- Prompt-Step-12-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-12-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
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 data of folder

Image titled Copy Files in Command Prompt Step 13

Image titled Copy Files in Command Prompt Step 13

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/9b/Copy-Files-in-Command-Prompt-Step-13-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-13-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/9b/Copy-Files-in-Command- Prompt-Step-13-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-13-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Access the path to the directory. Type cd and a space, then enter the path to the folder and press ↵ Enter .

  • For example, if you wanted to copy all the files in the “Example” folder stored on the desktop, you would enter C:UsershumpbDesktop here.
Image titled Copy Files in Command Prompt Step 14

Image titled Copy Files in Command Prompt Step 14

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/46/Copy-Files-in-Command-Prompt-Step-14-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-14-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/46/Copy-Files-in-Command- Prompt-Step-14-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-14-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the robocopy command. Type robocopy and a space, but don’t rush to press ↵ Enter .
Image titled Copy Files in Command Prompt Step 15

Image titled Copy Files in Command Prompt Step 15

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/f/fe/Copy-Files-in-Command-Prompt-Step-15-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-15-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/f/fe/Copy-Files-in-Command- Prompt-Step-15-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-15-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter a folder name. Type the name of the folder you want to copy, and then add a space. Again, don’t rush to press ↵ Enter .

  • Similar to filenames, spaces in directory names must be enclosed in double quotes.
Image titled Copy Files in Command Prompt Step 16

Image titled Copy Files in Command Prompt Step 16

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/81/Copy-Files-in-Command-Prompt-Step-16-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-16-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/81/Copy-Files-in-Command- Prompt-Step-16-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-16-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
Enter the destination folder. Type the path to where you want to save the copied data.

  • If the root directory has many files, copying those files to another folder that already has a lot of data will confuse you because you cannot copy the original directory.
READ More:   How to Rename a MacBook
  • Image titled Copy Files in Command Prompt Step 17

    Image titled Copy Files in Command Prompt Step 17

    {“smallUrl”:”https://www.wikihow.com/images_en/thumb/f/f2/Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg/v4-728px-Copy- Files-in-Command-Prompt-Step-17-Version-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/f/f2/Copy-Files-in-Command- Prompt-Step-17-Version-2.jpg/v4-728px-Copy-Files-in-Command-Prompt-Step-17-Version-2.jpg”,”smallWidth”:460,”smallHeight”:259,” bigWidth”:728,”bigHeight”:410,”licensing”:”<div class=”mw-parser-output”></div>”}
    Press ↵ Enter . This will copy the original directory’s data to another specified directory.
  • Advice

    • You can copy all files in a directory by typing the command copy *[file extension] (eg copy *.txt ).
    • If you want to create a new destination folder to save the copied files, you will enter the path to the destination folder (including the name of the destination folder) along with the “robocopy” command. [1] X Research Source
    • If you copy the Desktop folder’s data to the new folder, the new folder will be renamed “Desktop”.

    Warning

    • Copying files and folders in Command Prompt is often very dangerous if you do not know how to manipulate. Don’t copy or change any files or folders if you don’t know it well.
    X

    This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

    The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

    This article has been viewed 48,153 times.

    This is an article that shows you how to use the Windows Command Prompt to copy files or folders.

    Thank you for reading this post How to Copy Files in Command Prompt at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.

    Related Search:

    Related Posts

    How to Create Curved Text in Photoshop
    How to fall asleep faster
    How to Install FBReader to Read eBooks

    Category: How To

    Previous Post: « How to clean bird droppings
    Next Post: How to Reduce Calf Size »

    Copyright © 2025 · Tnhelearning.edu.vn - Useful Knowledge