create folders based on extensions files & moved files

Ali M

Active Member
Joined
Oct 10, 2021
Messages
290
Office Version
  1. 2019
  2. 2013
Platform
  1. Windows
hi experts

I want macro create folder's name is FILES-2022 based on current year in this directory "C:\Users\PC-ALM\Desktop\files" which contains variety files of differnt extensions .
so folder FILES-2022 should create many folders based on files extensions are existed in this directory "C:\Users\PC-ALM\Desktop\files" for instance FILE_PDF, FILE_DOCX ......

and should create the months folders inside folders extensions (FILE_PDF, FILE_DOCX ......)like JAN,FEB and moves the files extensions from "C:\Users\PC-ALM\Desktop\files"to are relating with folder extensions into folder month based on the month .
thanks
 
the same problem continues . and this is what I got
1.PNG
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
All creation months are April then, which agrees with the code, so there is nothing wrong with the code.

It looks like the problem is the way you are putting the files in the source folder. My guess is that you're copying and pasting the files there, because they all have the same creation date. You should move them instead and then they will keep the original creation dates.
 
Upvote 0
My guess is that you're copying and pasting the files there, because they all have the same creation date.
you're extremely right, sorry about this mistake . ?
now it works based on your guiding :)
much appreciated for your time and solution .(y)
 
Upvote 0

Forum statistics

Threads
1,215,597
Messages
6,125,738
Members
449,255
Latest member
whatdoido

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