Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Copy a group of folders but only 1 subfolder


12 Jul 2013   #1

Windows 7
 
 
Copy a group of folders but only 1 subfolder

I have a large group of 3000 folders and in them, there are the seletion of subfolders as shown below.

Property 1
-Gas
-Electric
-Asbestos

Property 2
-Gas
-Electric
-Asbestos

etc

I need to create a CD containing all Gas information so I was hoping to find a way of copying the folders so that the root folders, "Property 1", "Property 2" etc are still there but only contain the Gas subfolder.

The only way I know of is to copy the whole thing somewhere else and delete the subfolders I don't want but I don't have the hard drive space - the above list is a simplified version!

Many thanks in advance.

Pete


My System SpecsSystem Spec
.

12 Jul 2013   #2

Windows 7 x64
 
 

Since this is a custom thought process, you'll need to script it.
My System SpecsSystem Spec
12 Jul 2013   #3

Windows 8 Core X64
 
 

Are there files in the root directory, i.e. Property 1?

You can try xcopy, it may do what you need. Something like:

xcopy "\Property 1\Gas\*.*" "\targetdirectory" /e

Edit: You could also try robocopy with the /xd <Directory>[ ...] parameter.

/xd excludes directories that match the specified names and paths. That way you could do a full copy and exclude the sub-directories you don't want.
My System SpecsSystem Spec
.


18 Jul 2013   #4

Windows 7
 
 

Robocopy.... awesome! Did the job perfectly. Many thanks!
My System SpecsSystem Spec
18 Jul 2013   #5

Windows 8 Core X64
 
 

Great, glad it worked. Thanks for letting me know.
My System SpecsSystem Spec
Reply

 Copy a group of folders but only 1 subfolder




Thread Tools



Similar help and support threads for2: Copy a group of folders but only 1 subfolder
Thread Forum
Solved How to copy folders using wildcards Backup and Restore
How to copy local Group Policy? System Security
Outlook 2010, Some folders do not group emails into conversations Microsoft Office
Pc getting slow when copy files at home group network. Network & Sharing
Can only copy/move one group of files at a time? General Discussion
Adding group to a folders permissions? General Discussion
Group files/folders by individual name not A-H I-P Customization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 07:34 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33