Home All Groups Group Topic Archive Search About

Script to delete files which is 30 days older...



Author
27 Nov 2007 7:37 AM
Leezy
Hi guys,

I am trying to create a script to delete files which are 30 days old.

i dont seems to find the command which is able to pick up files which are 1
month old.

any one can help?

Author
27 Nov 2007 8:30 AM
Pegasus (MVP)
"Leezy" <le***@mcsb.com> wrote in message
news:uz4BygMMIHA.4752@TK2MSFTNGP05.phx.gbl...
> Hi guys,
>
> I am trying to create a script to delete files which are 30 days old.
>
> i dont seems to find the command which is able to pick up files which are
> 1
> month old.
>
> any one can help?
>

I assume you mean "delete files which are more than 29 days old",
which is not quite the same as "delete files which are 30 days old".
If so then you could use this single command line:

xxcopy /rs /db#30 /ed /yy "d:\My Files\*.txt" d:\Temp\

You can download xxcopy.exe from a number of site. If you
prefer to do it in VB Scripting, let's have a look at your code!
Author
27 Nov 2007 8:50 PM
Alain Vouillon
"Leezy" a écrit:

> I am trying to create a script to delete files which are 30 days old.
> i dont seems to find the command which is able to pick up files which are
> 1
> month old.
> any one can help?

Hello,

See the script SupprTempFilesFolder.vbs in
http://a.vouillon.online.fr/faq-winxp.htm#171A



--
@:-)
FAQ Windows XP ==> http://a.vouillon.online.fr/

AddThis Social Bookmark Button