How to Copy Files to a USB Using Command Prompt (CMD) (2024)

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

Download Article

Explore this Article

Steps

Steps

Other Sections

Related Articles

References

Article Summary

Written byNicole Levine, MFA

Last Updated: July 26, 2024

Download Article

Whether you're unable to boot into Windows or just want to learn new ways to manage files, you can use the Command Prompt to copy data from your hard drive to your flash drive. If you're just copying individual files, you can use the copy command. But if you want to copy an entire folder, including any subfolders and files inside, the xcopy command is a better option. This wikiHow teaches you how to use both copy and xcopy to copy files and folders at the Windows Command Prompt.

Copying Files to USB with Windows Command Prompt

  1. Open the Command Prompt.
  2. Find the drive letter of your USB flash drive.
  3. Create a new folder in your flash drive if you'd like to.
  4. Enter the folder location that contains the files you want to copy.
  5. Use the "copy" command to copy individual files.
  6. Use the "xcopy" command to copy an entire folder.

Steps

Download Article

  1. 1

    Open the Command Prompt. If you haven't already done so, here's how you can access your Windows command prompt:

    • Press Windows key + S to activate the search bar.
    • Type cmd into the search bar.
    • If you need to copy system files, right-click Command prompt and select Run as administrator.
      • You don't have to do this if you're booted into recovery mode, as the Command Prompt will always run as an administrator this way.
    • If you're copying personal files, like your own pictures or documents, just click Command prompt.
  2. 2

    Find out the drive letter of your USB flash drive. If you already know the letter assigned to the drive (e.g., E or F), you can skip this step. If not, here's how to find it:

    • Type or paste this command after the prompt: wmic logicaldisk where drivetype=2 get deviceid, volumename, description
    • Press Enter.

    Advertisem*nt

  3. 3

    Create a new folder on your USB drive (optional). If you want to copy files to a specific folder rather than the root of your flash drive, you can create one at the command prompt. Here's how:

    • Type cd F: (if your flash drive isn't F:, replace it with your drive letter}} and press Enter.
    • Type mkdir foldername and press Enter (replace foldername with the name you want to give the new folder).
  4. 4

    Go to the folder that contains the file(s) you want to copy. For example, if you want to copy the contents of your personal Documents folder, you can enter that folder by typing cd C:\Users\yourname\Documents.

    • If there's a space in the name of the folder, such as C:\Users\yourname\rough drafts, you'll need to place the entire path in quotes like this: cd "C:\Users\yourname\rough drafts.
    • To see all the files inside of a folder, type dir and press Enter.
    • Type dir and press Enter to see existing files and folders. All folders are labeled with ''<DIR>'', which tells you that these are folders instead of files.
  5. 5

    Use the copy command to copy individual files. If you want to copy just one file (no folders) onto your USB drive, it'll be easiest to use the copy command to do so. Here's how:

    • When you use the copy command, you'll use it like this: copy source destination. For example, to copy a file called cats.docx from your current directory to a folder called Pets on your USB flash drive that's assigned the F: drive letter, you'd do this:
      • copy cats.docx F:\Pets\
    • If you want to copy multiple individual files at once that end with the same file extension (e.g., .docx to the Pets folder on your flash drive, you'd type copy *.docx F:\Pets\).[1]
  6. 6

    Use xcopy to copy an entire folder and all of its files and subfolders. If you're backing up an entire folder to your flash drive or otherwise need to copy multiple files, xcopy does a great job at that. For example, let's say you want to copy the entire folder C:\Users\yourname\rough drafts, including all of the files and folders inside of it, to the F drive. You'd use:

    • xcopy "C:\Users\yourname\rough drafts\" F:\ /e /h /r
    • Notice the trailing backslash \ at the end of the first path—this tells xcopy that you're copying a folder, not an individual file.[2]
    • Adding /e tells xcopy to copy all sub-folders.
    • Including /h ensures that xcopy also copies hidden files.
    • Adding /r also includes any read-only files.[3]
  7. Advertisem*nt

Expert Q&A

Ask a Question

200 characters left

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

Submit

      Advertisem*nt

      Tips

      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!

      You Might Also Like

      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 toCopy Files in Command PromptHow 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 Windows5 Simple Ways to Open the Command Prompt in Windows

      Advertisem*nt

      About This Article

      How to Copy Files to a USB Using Command Prompt (CMD) (24)

      Written by:

      Nicole Levine, MFA

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 124,577 times.

      How helpful is this?

      Co-authors: 6

      Updated: July 26, 2024

      Views:124,577

      Categories: Command Prompt

      Article SummaryX

      1.Open the Command Prompt as an administrator if copying system files.
      2.Use the "copy" command to copy individual files.
      3.Use the "xcopy" command to copy entire folders and their contents.

      Did this summary help you?

      In other languages

      Indonesian

      Portuguese

      Hindi

      French

      Thai

      Spanish

      Chinese

      Dutch

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 124,577 times.

      Is this article up to date?

      Advertisem*nt

      How to Copy Files to a USB Using Command Prompt (CMD) (2024)
      Top Articles
      9 Best Alternatives to Bankruptcy | Find Debt Relief Now!
      Investing For Dummies
      Instructional Resources
      Online Reading Resources for Students & Teachers | Raz-Kids
      Martha's Vineyard Ferry Schedules 2024
      Google Jobs Denver
      Geodis Logistic Joliet/Topco
      Free Robux Without Downloading Apps
      Best Cav Commanders Rok
      Infinite Campus Parent Portal Hall County
      A.e.a.o.n.m.s
      Hillside Funeral Home Washington Nc Obituaries
      Cnnfn.com Markets
      Craigslist Edmond Oklahoma
      Louisiana Sportsman Classifieds Guns
      Mikayla Campinos Laek: The Rising Star Of Social Media
      Evil Dead Rise - Everything You Need To Know
      Dover Nh Power Outage
      The best firm mattress 2024, approved by sleep experts
      Laveen Modern Dentistry And Orthodontics Laveen Village Az
      U Of Arizona Phonebook
      Craigslistodessa
      Best Boston Pizza Places
      How To Find Free Stuff On Craigslist San Diego | Tips, Popular Items, Safety Precautions | RoamBliss
      Meet the Characters of Disney’s ‘Moana’
      Nearest Ups Ground Drop Off
      Bayard Martensen
      Allegheny Clinic Primary Care North
      Fedex Walgreens Pickup Times
      Chase Bank Cerca De Mí
      Sedano's Supermarkets Expands to Orlando - Sedano's Supermarkets
      Exploring TrippleThePotatoes: A Popular Game - Unblocked Hub
      Lucky Larry's Latina's
      Mp4Mania.net1
      Retire Early Wsbtv.com Free Book
      Frcp 47
      Wsbtv Fish And Game Report
      Sunrise Garden Beach Resort - Select Hurghada günstig buchen | billareisen.at
      Dogs Craiglist
      Devon Lannigan Obituary
      Clausen's Car Wash
      How Big Is 776 000 Acres On A Map
      Cabarrus County School Calendar 2024
      Streameast Io Soccer
      Craigslist Pet Phoenix
      Maplestar Kemono
      Wpne Tv Schedule
      Dineren en overnachten in Boutique Hotel The Church in Arnhem - Priya Loves Food & Travel
      What Time Do Papa John's Pizza Close
      Latest Posts
      Article information

      Author: Barbera Armstrong

      Last Updated:

      Views: 5690

      Rating: 4.9 / 5 (79 voted)

      Reviews: 86% of readers found this page helpful

      Author information

      Name: Barbera Armstrong

      Birthday: 1992-09-12

      Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

      Phone: +5026838435397

      Job: National Engineer

      Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

      Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.