Sign in with
Sign up | Sign in
Your question

How to delete a file depending on date

Last response: in Windows 2000/NT
Share
July 8, 2004 3:25:01 AM

Archived from groups: microsoft.public.win2000.file_system (More info?)

Hi

I would like to delete files that has a date older than a month.
Is there anyone who know any toll or script that can do that?
Anonymous
July 8, 2004 11:43:46 AM

Archived from groups: microsoft.public.win2000.file_system (More info?)

On Wed, 7 Jul 2004 23:25:01 -0700, "Tomas"
<Tomas@discussions.microsoft.com> wrote in
microsoft.public.win2000.file_system:

>I would like to delete files that has a date older than a month.
>Is there anyone who know any toll or script that can do that?

Here's how I delete files older than 30 days, using 4NT:
DEL /[d-30,1980/1/1]

I use this regularly to delete old log files and such.

4NT's date ranges are documented at
<http://jpsoft.com/help/dateranges.htm&gt;

If you really want to delete files older than exactly one month, ask
again - it will require a slightly more elaborate solution. But I
suspect "older than 30 days" might suffice.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
!