1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

How to use XCOPY to copy a folder stucture and NO files.

Discussion in 'DOS/Other' started by gwashington, Dec 30, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. gwashington

    gwashington Thread Starter

    Joined:
    Jul 1, 2007
    Messages:
    22
    i have a folder named "WebDesign" with two folders "Fonts" and "Layouts". I need a great .bat file to execute a 'copy all the folders but not the files'

    Im thinikn and tryin to figure out this setup

    F:\WebDesign\Fonts
    F:\WebDesign\Layouts

    i want to practice using XCOPY to copy ONLY the folder sturcture.

    I want to XCOPY the F:\ drive to my N:\
    xcopy f:\ - t -e isnt working ..or is this a unkwn syntax that dont work?
    is there a better way?
     
  2. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    It should be
    Xcopy f: n: /T /E
     
  3. TheOutcaste

    TheOutcaste

    Joined:
    Aug 7, 2007
    Messages:
    9,028
    You need to specify a path (the root folder in this case, \}as well as the drive letter. If you specify just the drive letter, it will use the current folder on each drive, which might not be the root.
    xcopy f:\ n:\ /E /T
    If any folders have the hidden or system attributes set, you need to also use the /H switch.
     
  4. gwashington

    gwashington Thread Starter

    Joined:
    Jul 1, 2007
    Messages:
    22
    i will try it out and let u all know my results..i see the issue was that i was using a "-" instead of the forward slah.i feel so stupid cause i suppose to know this ..sigh :)
     
  5. Ent

    Ent Trusted Advisor

    Joined:
    Apr 11, 2009
    Messages:
    5,467
    First Name:
    Josiah
    I've started making that same mistake after trying to learn the Linux command line. It is really annoying, but it's nice to know what problems you commonly suffer from so you can check them before doing a comprehensive debug.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - XCOPY copy folder
  1. niedernsill
    Replies:
    3
    Views:
    252
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/971657

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice