pulling files from a folder...

cmefly

Well-known Member
Joined
May 13, 2003
Messages
683
Hi,

I've got a main folder with 88 folders inside (each folder is for a different client so they are named differently). However, each of these 88 folders has a sub-folder called "final results" and within it, there is an excel file called "2011_Jan_results_CLIENTNAME.XLS".

c:\main folder
88 files within this folder
an example is:
c:\main folder\client_name
and in each of the client's folder is a subfolder
c:\main folder\client_name\final results
c:\main folder\client_name\final results\2011_Jan_results_CLIENTNAME.XLS

I need to get all these files ("2011_Jan_results_CLIENTNAME.XLS") into one folder called "all client final results"....

is there such a code that can help me COPY these files into the new directory?

thanks,

Marc
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Does it have to be code?

You could do a search for "2011_Jan_results*" in Explorer and then drag the results into your new folder.

If it does have to be code, it is possible.
 
Upvote 0
Weaver,

can you please post a code or link to a code? i'm having trouble copying and pasting a large amount of files...server issue...

thanks,

Marc
 
Upvote 0
There's some stuff here that might get you started. The OP wanted a directory listing, so you could tweak it to get filenames and paths then move the files to another folder.

HTH
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top