LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default VBA Macro - Loop through folder and move files to other folders

I have 5 folders (ABC_Blue, ABC_Green, ABC_Red, ABC_Yellow, Results). The
folder named Results contains three files (Blue.xls, Green.xls, Red.xls).

I need to create a macro to loop through the results folder, and copy excel
files into the other 4 folders based on whether or not any part of the folder
name contains the name of the exel files. As an example, since ABC_Blue
folder contains Blue within its name, the Blue.xls file should be copied to
this location.

I would be one happy camper if the above could be accomplished, but I
wouldn't know what to do with myself if in addition some functionality could
be added to show any files within the results folder that were not copied
somewhere else. As an example, if there was an excel file name Purple.xls
within the Results folder, it wouldn't be copied to another folder because
there isn't one containing Purple within its name.

I know enough VBA to be dangerous, so if someone can help me get started I'm
sure I can muddle through the rest eventually.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Move files into particular folders CAM Excel Programming 0 December 4th 08 02:17 AM
Number of files in a folder including sub-folders [email protected] Excel Programming 1 March 7th 08 02:21 PM
Move Files from Folder to Folder THE_RAMONES Excel Programming 2 May 25th 06 09:23 PM
delete all the contents (sub folders and files) in the temp folder Joseph Excel Discussion (Misc queries) 0 June 6th 05 08:01 AM
Loop thru All Files in a Folder Juan Sanchez Excel Programming 3 July 5th 04 06:38 PM


All times are GMT +1. The time now is 08:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"