Removing Files older than X days

  • Thread starter Thread starter ThePope
  • Start date Start date
T

ThePope

Hi,

I need to find a command or tool to remove files older than an X amount of
days on a W2K host.

In UNIX I can use the find command but the NT command only has basic
parameters.

I've looked on Google to no avail.

Any help would be appreciated.

Thanks.
 
ThePope said:
Hi,

I need to find a command or tool to remove files older than an X
amount of days on a W2K host.

Start->Search->File and Folders->Date
 
I did forget to mention that I needed it to run in a batch mode via a
scheduled job.

Basically removing some backup files which are older than 3 days on a
regular basis.

Thanks.

Madhur Ahuja said:
ThePope said:
Hi,

I need to find a command or tool to remove files older than an X
amount of days on a W2K host.

Start->Search->File and Folders->Date

--
Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com]

Homepage
http://madhur.netfirms.com
 
ThePope said:
Hi,

I need to find a command or tool to remove files older than an X amount of
days on a W2K host.

In UNIX I can use the find command but the NT command only has basic
parameters.

I've looked on Google to no avail.

Any help would be appreciated.

Thanks.

xxcopy.exe can do this sort of thing. It's freely downloadable.
 
ThePope said:
Hi,

I need to find a command or tool to remove files older than an
X amount of days on a W2K host.

In UNIX I can use the find command but the NT command only has basic
parameters.

I've looked on Google to no avail.
Hi

In the article below there is a WSH script (vbscript) by Michael Harris
that deletes files x days old in a specific folder (and optionally all
subfolders).

Newsgroups: microsoft.public.scripting.wsh
Date: 2002-10-07 08:12:33 PST
http://groups.google.com/[email protected]

If you put it in a scheduled task, remove this from the script:

msgbox nDeleted & " of " & ubound(arFiles)+1 _
& " eligible files were deleted"



WSH 5.6 documentation (local help file) can be downloaded from
here if you haven't got it already:
http://msdn.microsoft.com/downloads/list/webdev.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top