RP1America
Technical User
Using Excel, I need to create a macro to be run daily (manually via command button) to move files all located in one source folder to various destination folders depending on the file name and whether or not the file's name contains a variation on today's date.
Source Folder:
"I:\RP\Source\"
Destination Folders:
"I:\RP\Destination\CashDetail"
"I:\RP\Destination\CheckRegister"
"I:\RP\Destination\Deposits"
"I:\RP\Destination\Excel Trade Sheets"
Sample Files:
CashDetail0803.xls
CashDetail0806.xls
CashDetail0807.xls
DEPOSITS0803.xlsx
DEPOSITS0806.xlsx
DEPOSITS0807.xlsx
Check_Register_Report_8 3 12.csv
Check_Register_Report_8 6 12.csv
Check_Register_Report_8 7 12.csv
TRAD080312.xlsx
TRAD080612.xlsx
TRAD080712.xlsx
Criteria:
Only files prior to today (in this case 8/7/12) should be moved.
Files beginning with "CashDetail" should be moved to the "CashDetail" destination folder.
Files beginning with "DEPOSITS" should be moved to the "Deposits" destination folder.
Files beginning with "Check_Register_Report_" should be moved to the "CheckRegister" destination folder.
Files beginning with "TRAD" should be moved to the "Excel Trade Sheets" destination folder.
Any help is greatly appreciated!
Source Folder:
"I:\RP\Source\"
Destination Folders:
"I:\RP\Destination\CashDetail"
"I:\RP\Destination\CheckRegister"
"I:\RP\Destination\Deposits"
"I:\RP\Destination\Excel Trade Sheets"
Sample Files:
CashDetail0803.xls
CashDetail0806.xls
CashDetail0807.xls
DEPOSITS0803.xlsx
DEPOSITS0806.xlsx
DEPOSITS0807.xlsx
Check_Register_Report_8 3 12.csv
Check_Register_Report_8 6 12.csv
Check_Register_Report_8 7 12.csv
TRAD080312.xlsx
TRAD080612.xlsx
TRAD080712.xlsx
Criteria:
Only files prior to today (in this case 8/7/12) should be moved.
Files beginning with "CashDetail" should be moved to the "CashDetail" destination folder.
Files beginning with "DEPOSITS" should be moved to the "Deposits" destination folder.
Files beginning with "Check_Register_Report_" should be moved to the "CheckRegister" destination folder.
Files beginning with "TRAD" should be moved to the "Excel Trade Sheets" destination folder.
Any help is greatly appreciated!