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

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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?
 

Ent

Josiah
Retired Trusted Advisor
Joined
Apr 11, 2009
Messages
5,467
It should be
Xcopy f: n: /T /E
 
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.
 

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 :)
 

Ent

Josiah
Retired Trusted Advisor
Joined
Apr 11, 2009
Messages
5,467
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 :)
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Members online

Top