How do I copy a folder in command prompt?

By Pooter22
Jan 2, 2009
  1. I need to copy a folder from my usb harddrive to the program files folder on the c drive. I need the entire folder not just a file. Is this possible, if so, what is the correct command to do this?

  2. kimsland

    kimsland Ex-TechSpotter Posts: 18,353

    XCopy E:\FolderName %ProgramFiles%

    Assuming E: is your USB Drive letter
    And substituting FolderName for your folder name
  3. Pooter22

    Pooter22 TS Rookie Topic Starter

    it says xcopy is not recognised as a command
  4. kimsland

    kimsland Ex-TechSpotter Posts: 18,353

    %windir%\System32\XCopy E:\FolderName %ProgramFiles%

    or try:

    Copy E:\FolderName %ProgramFiles%
  5. CCT

    CCT TS Evangelist Posts: 3,556

    I use a little .bat file to periodically copy all my picture files from one HD to another. Create a folder on the other drive, I used 'Backup';

    @ echo off



    dir /w


    cd\Documents and Settings\CCT\My Documents\My Pictures\

    dir /w


    copy *.* d:\Backup



    You don't need the 'pause' entries, I just like them - :)
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...

Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.