• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 214
  • Last Modified:

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
0
Vincent Costanza
Asked:
Vincent Costanza
1 Solution
 
Vincent CostanzaOwnerAuthor Commented:
Thanks for you help
0
 
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

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now