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
petebaldwin

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
pcunite

Windows 7 x64
 
 

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

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
petebaldwin

Windows 7
 
 

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

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
Thread Forum
Seeing all files without folders or subfolder windows 7?
Hi everyone, I've had a mac for the longest time and iphoto is starting to drive me nuts. I've made the switch to windows 7 and love it. I'm trying to organize all of my photos but when I exported all my photos from my mac it created all of these wierd folder and subfolder names that make no...
General Discussion
How to copy local Group Policy?
I have a large network of about 500 machines on a domain. I have set up a local account for exams, with a special local Group Policy that is for non-administrators. The group policy restricts almost everything apart from a few applications. I need to copy this GP over to another 20-30 machines....
System Security
Outlook 2010, Some folders do not group emails into conversations
Hi Folks, I have a strange issue, recently we've migrated to outlook 2010, and following this process some of my outlook 2010 folders are not grouping emails into conversations. Andy idea what would be the cause/fix for this issue. Any help would be appreciated. Cheers,
Microsoft Office
Pc getting slow when copy files at home group network.
Hello, have win 7 ultimate 64, home network over wifi to my wife laptop, router sisco e3000. CPU : qx9850 (@3800 MHz), VGA Ati 5870, motherboard asus p5q deluxe ( or how this model) 8 gb gskill DDRII 1200 MHz . 3 sataII hdd, case xcilio 1000. All stable and not overheating. Games runs good. ;)...
Network & Sharing
Can only copy/move one group of files at a time?
Is it just me or has Win 7 stopped the ability to move more than one group of files/folder at a time? For example, I'm trying to transfer some music album folders to a USB or another folder. I drag and drop the first album in there, but I have to wait to the progress box to finish before I can...
General Discussion
Adding group to a folders permissions?
I deleted a user from a folders permissions figuring I could add it back. When I go to do that the "Add" button is greyed out and I can't do it. What am I doing wrong? Thanks in advance!
General Discussion

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 15:08.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App