Jump to content
Macro Express Forums

Make A List Of Directory By Date


randallc

Recommended Posts

"Tech"

I have a folder that I would like to have a macro check the number of files

within it and if it is greater than 3 delete the remaining files based on

the date. Any files older than the third oldest file would be deleted.

Any assistance would be greatly appreciated.

Cheers.

Terry

Again, shows File Dates by integers”immediately” converted to a “comparison date sting value”; direct editor/ “RMIV” command;

I have thought it would be easiest to use a sort program for this; first creates a list of files in the directory, sorted by date, then shows in a text file those that would be deleted if you chose to keep the last “x” files .

The “Sort” is a .vbs derivative of Floyd’s vbs sort; runs in 2 lines as “Run Macro in variable”

Let me know; Randall

ListDirectorySorted_maybeDeletd.mxe

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...