How to delete a file depending on date

tomas

Distinguished
May 7, 2004
18
0
18,510
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?
 
G

Guest

Guest
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>

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"
 

TRENDING THREADS