Solved

How to delete files based on their age in day

Posted on 2008-09-29
2
194 Views
Last Modified: 2012-06-27
How can I use a batch file to delete files based on creation date in days
0
Comment
Question by:vpciii
2 Comments
 

Author Comment

by:vpciii
ID: 22602050
Thanks for you help
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 250 total points
ID: 22605455
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now