How to delete files based on their age in day

How can I use a batch file to delete files based on creation date in days
Vincent CostanzaOwnerAsked:
Who is Participating?
 
Shift-3Commented:
You can do this with a vbscript like the one from this article:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov06/hey1117.mspx

Doing it in batch is difficult, as math with dates is problematic.  There is the Forfiles utility, but it only works on modified date, not creation date.
http://technet.microsoft.com/en-us/library/cc753551.aspx
0
 
Vincent CostanzaOwnerAuthor Commented:
Thanks for you help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.