Remove dated folder

  • Thread starter Thread starter climberpm
  • Start date Start date
C

climberpm

I create backups in folders titled with the days date, 022205Diff, I would
like to script a command to delete these folders after 1 week but I can't
seem to figure out how to do it. I tried del, purger, remdir with wilcards
??????Diff but they all come up empty as in they do not work.

Any thoughts !

Thanks

Paul
 
I create backups in folders titled with the days date, 022205Diff, I would
like to script a command to delete these folders after 1 week but I can't
seem to figure out how to do it. I tried del, purger, remdir with wilcards
??????Diff but they all come up empty as in they do not work.

Any thoughts !

Thanks

Paul
Assumming the 022005Diff is MonthDayYearDiff
and that Month is always 2 diguts and day is always 2 digits and year is always 2 digits, then,
use DatePorM from tip 8293 in the 'Tips & Tricks' at http://www.jsiinc.com to calculate what date
is 7 days old , and 8 days old, etcx, until you get a folder not found.






Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top