How to Copy Files in Command Prompt (with Pictures) - wikiHow (2024)

  • Categories
  • Computers and Electronics
  • Operating Systems
  • Windows
  • Command Prompt

Download Article

Explore this Article

parts

1Preparing to Copy

2Copying Individual Files

3Copying a Folder's Contents

Other Sections

Tips and Warnings

Related Articles

References

Article Summary

Written byJack Lloyd

Last Updated: August 8, 2023Fact Checked

Download Article

Do you need to copy and paste files or folders without using the File Explorer? While navigating the file system with Windows Command Prompt (cmd) might seem daunting, it's actually pretty easy once you get the hang of it. This wikiHow will teach you how to copy one or more files from one folder to another from the command line in Windows.

Part 1

Part 1 of 3:

Preparing to Copy

Download Article

  1. 1

    Find out your file's location. You'll need the file's location—also known as a "directory"—in order to tell Command Prompt where to look for the file.

    • You can find the file's directory by going to the file's location in File Explorer and then clicking the URL bar near the top of the File Explorer window.
    • Most files will be somewhere in the following directory: [drive letter]:\Users\[username] (for example, "C:\Users\Kyle"). This is the directory in which almost every user-created file on your computer is located.
    • A file on your desktop for the above example would be in the "C:\Users\Kyle\Desktop" directory, while a file in the Documents folder would be in the "C:\Users\Kyle\Documents" directory.
  2. 2

    Know your file's name. If you want to copy your file, you'll need to know its name. Keep in mind that file names are case-sensitive in Command Prompt, so you'll need to include the proper capitalization.

    Advertisem*nt

  3. 3

    Open Start

    . Click the Windows logo in the bottom-left corner of the screen.[1]

  4. 4

    Type in command prompt. Doing so will search your computer for the Command Prompt program.[2]

  5. 5

    Click

    Command Prompt. It's at the top of the Start window. Doing so will open the Command Prompt program.[3]

    • Keep in mind that if you're on a shared computer (e.g., a school or public PC), you may not be able to access the Command Prompt.
  6. Advertisem*nt

Part 2

Part 2 of 3:

Copying Individual Files

Download Article

  1. 1

    Enter the "change directory" command. Type in cd followed by a space, but don't press Enter.[4]

  2. 2

    Type in your file's directory. Enter the directory in which the file that you want to copy is located.

  3. 3

    Press Enter. Doing so will reset Command Prompt to look in the entered directory.

  4. 4

    Enter the "copy" command. Type in copy followed by a space, but don't press Enter yet.[5]

  5. 5

    Enter your file's name. Type in your file's name followed by a space, making sure to include the file's extension (e.g., .txt) for a text file. Don't press Enter after doing so.[6]

    • If there are spaces in the file's name, you need to put quotation marks around them. For example, a file named "Pickles are Good.txt" would be Pickles" "are" "Good.txt in Command Prompt.
  6. 6

    Enter a destination directory. Type in another directory (e.g., C:\Users\[you]\Desktop into which you want to copy the file.

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

    Press Enter. Doing so will copy the file into your indicated directory. You can view the copied file by going to the directory in question in your computer's File Explorer.

  8. Advertisem*nt

Part 3

Part 3 of 3:

Copying a Folder's Contents

Download Article

  1. 1

    Go to the folder's directory. Type in cd followed by a space, then type in the folder's directory and press Enter.[7]

    • For example, if you want to copy all of the files inside of a folder called "Example" that's on your desktop, you'd go to C:\Users\humpb\Desktop here.
  2. 2

    Enter the robocopy command. Type in robocopy and then a space, but don't press Enter yet.[8]

  3. 3

    Enter a folder's name. Type in the name of the folder that you want to copy, then add a space. Again, don't press the Enter key just yet.

    • As with file names, you'll need to use quotes around any spaces in the folder name.
  4. 4

    Enter a destination. Type in a directory into which you want to copy the folder's files.

    • If there are lots of files in the folder, this can get messy if you copy them into an unorganized folder since the folder itself won't be copied with the files.
  5. 5

    Press Enter. Doing so will copy the contents of the folder into your destination folder.

  6. Advertisem*nt

Community Q&A

Search

Add New Question

  • Question

    Which command should I use to copy files?

    How to Copy Files in Command Prompt (with Pictures) - wikiHow (25)

    Community Answer

    Copy "source path" "destination path". For example, you might copy "C:\Users\qclab\Desktop\Stuff.txt" "P:\IT\Confidential". The quotation marks are optional unless you have spaces in your folder or file names. To copy everything in a folder use *.* as the name and extension. For example, copy "C:\Users\qclab\Desktop\Stuff.txt" "P:\IT\Confidential".

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 19Helpful 46

  • Question

    Is it possible to move a PDF file from one folder to another and not have it overwrite another file with the same name by having a different date?

    How to Copy Files in Command Prompt (with Pictures) - wikiHow (26)

    Community Answer

    You'll have to rename the PDF file prior to moving it, as two files with the same name can't reside in the same folder.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    Not Helpful 9Helpful 18

  • Question

    How can I copy all files from sub directories with a similar name to a different directory?

    How to Copy Files in Command Prompt (with Pictures) - wikiHow (27)

    Community Answer

    After you do one, press the up key and then change the name, which shouldn't take up much time.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 21Helpful 26

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Tips

      • If you want to create a new destination folder for a set of copied files, enter the directory for the destination folder (including the destination folder itself) in conjunction with the "robocopy" command.[9]

        Thanks

        Helpful0Not Helpful0

      • You can copy all files in a directory by typing copy *[file type] (e.g., copy *.txt).

        Thanks

        Helpful0Not Helpful0

      • If you copy the Desktop folder's contents into a new folder, that new folder will be renamed to "Desktop".

        Thanks

        Helpful0Not Helpful0

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Name

      Please provide your name and last initial

      Submit

      Thanks for submitting a tip for review!

      Advertisem*nt

      Warnings

      • Copying files and folders within Command Prompt is potentially dangerous if you don't know what you're doing. Never copy or manipulate any files or folders that you don't understand.

        Thanks

        Helpful1Not Helpful0

      Advertisem*nt

      You Might Also Like

      How to Use MS DOSHow toCreate and Delete Files and Directories from Windows Command Prompt
      How to Navigate to a Different Folder in the Command PromptHow to Format a USB Using CMD (Command Prompt)How to Change a Windows Password Using Command PromptHow toAdd Users from CMDHow to Open a Folder in Command Prompt (CMD)How toUse Windows Command Prompt to Run a Python FileHow toReboot from Command Prompt on WindowsHow to Run a Windows Batch File from the Command Line (CMD)How toUse Net SendHow to Run an EXE File at the Windows Command PromptHow toWatch Star Wars on Command Prompt3 Ways to Open Command Prompt with Keyboard on Windows

      Advertisem*nt

      About This Article

      How to Copy Files in Command Prompt (with Pictures) - wikiHow (43)

      Written by:

      Jack Lloyd

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 2,395,760 times.

      How helpful is this?

      Co-authors: 28

      Updated: August 8, 2023

      Views:2,395,760

      Categories: Command Prompt

      Article SummaryX

      1. Type "cd" followed by a space in command prompt, but don't press "enter" yet.
      2. Type the name of the directory your filed is located in.
      3. Press "enter."
      4. Type "copy" followed by a space, but don't press "enter."
      5. Type your file's name followed by a space, but don't press "enter."
      6. Type in the name of the directory you want to copy the file to.
      7. Press "enter" to copy the file.

      Did this summary help you?

      In other languages

      Spanish

      Portuguese

      Russian

      German

      Indonesian

      Dutch

      Chinese

      French

      Arabic

      Thai

      Korean

      Hindi

      Turkish

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 2,395,760 times.

      Is this article up to date?

      Advertisem*nt

      How to Copy Files in Command Prompt (with Pictures) - wikiHow (2024)
      Top Articles
      5: Surface Analytical Techniques
      Correcting for Inflation
      Maxtrack Live
      Pollen Count Centreville Va
      Bild Poster Ikea
      Cars & Trucks - By Owner near Kissimmee, FL - craigslist
      craigslist: kenosha-racine jobs, apartments, for sale, services, community, and events
      Sprague Brook Park Camping Reservations
      Toyota gebraucht kaufen in tacoma_ - AutoScout24
      15 Types of Pancake Recipes from Across the Globe | EUROSPAR NI
      Shaniki Hernandez Cam
      Ncaaf Reference
      Lantana Blocc Compton Crips
      Elle Daily Horoscope Virgo
      Newgate Honda
      1-833-955-4522
      Wausau Marketplace
      ZURU - XSHOT - Insanity Mad Mega Barrel - Speelgoedblaster - Met 72 pijltjes | bol
      Where Is The Nearest Popeyes
      Kamzz Llc
      PowerXL Smokeless Grill- Elektrische Grill - Rookloos & geurloos grillplezier - met... | bol
      Directions To Cvs Pharmacy
      R&S Auto Lockridge Iowa
      Loslaten met de Sedona methode
      Shoe Station Store Locator
      Olivia Maeday
      Chicago Based Pizza Chain Familiarly
      The Banshees Of Inisherin Showtimes Near Broadway Metro
      3569 Vineyard Ave NE, Grand Rapids, MI 49525 - MLS 24048144 - Coldwell Banker
      Hdmovie2 Sbs
      Giantbodybuilder.com
      Times Narcos Lied To You About What Really Happened - Grunge
      Speechwire Login
      Tu Housing Portal
      Club Keno Drawings
      Fastpitch Softball Pitching Tips for Beginners Part 1 | STACK
      Urban Blight Crossword Clue
      Truis Bank Near Me
      Scioto Post News
      Crazy Balls 3D Racing . Online Games . BrightestGames.com
      2700 Yen To Usd
      Telugu Moviez Wap Org
      Craigslist Freeport Illinois
      Vons Credit Union Routing Number
      The Realreal Temporary Closure
      Stosh's Kolaches Photos
      The Machine 2023 Showtimes Near Roxy Lebanon
      Workday Latech Edu
      Uno Grade Scale
      Koniec veľkorysých plánov. Prestížna LEAF Academy mení adresu, masívny kampus nepostaví
      The Ultimate Guide To 5 Movierulz. Com: Exploring The World Of Online Movies
      Emmi-Sellers
      Latest Posts
      Article information

      Author: Kerri Lueilwitz

      Last Updated:

      Views: 5651

      Rating: 4.7 / 5 (47 voted)

      Reviews: 94% of readers found this page helpful

      Author information

      Name: Kerri Lueilwitz

      Birthday: 1992-10-31

      Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

      Phone: +6111989609516

      Job: Chief Farming Manager

      Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

      Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.