471,596 Members | 818 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

Delete files in folder based on modified date.

Let's say I have the following folder:
C:\Archive\Data\Logs\

and within this folder are many files in this format:
Cycle Run of Tuesday, February 01, 2005.html
Cycle Run of Wednesday, February 02, 2005.html
..
..
..
Cycle Run of Monday, February 28, 2005.html
The folder gets larger every day when a new file is created. What I
want to do is setup an application that would delete all the previous
month's files. I would setup an executable to run off a PC as a
'Scheduled Task' on the 28th of every month to delete the previous
month's files. So, example on the 28th of March it would delete all the
files that were created in February. I guess you would somehow use the
'Modified Date'?

Nov 21 '05 #1
0 1100

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Robizzle | last post: by
2 posts views Thread by Thomas Bauer | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.