search prefix files names and moves to specific folder

abdo meghari

Active Member
Joined
Aug 3, 2021
Messages
465
Office Version
  1. 2019
hello
every month I attach files (PDF,XLSX) in this directory C:\Users\PC Leopard\Downloads . the attached PDF extensions files contains names MN-2022-00010 , MN-2022-00011 ......
& the attached XLSX extensions files contains names Bridgestone Sales Report 04 APR. 2022,Bridgestone Sales Report 05 Mar. 2022, .so what I want create two folders for files PDF & XLSX files thier names are PURCHASE_PDF & SALES & RETURNS_XLSX and create folders months into them . for instance create folder REPOR_APRIL based on current month and move the files contain "MN" in the first part (MN-2022-00010 , MN-2022-00011 ......) from C:\Users\PC Leopard\Downloads to C:\Users\PC Leopard\Downloads\PURCHASE_PDF\REPORT_APRIL . as to folder SALES & RETURNS_XLSX create folder REPORT_APRIL based on current month and move the files contain MONTH
(04 APR) ( Bridgestone Sales Report 04 APR) from C:\Users\PC Leopard\Downloads to C:\Users\PC Leopard\Downloads\SALES & RETURNS_XLSX\REPORT_APRIL
I hope from the experts provide me macro for this project .
thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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