randallc Posted March 28, 2005 Report Share Posted March 28, 2005 "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 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.