Hi,
let's have a look what comes out of the magic wand ;-)
Set oFSO = CreateObject("Scripting.FileSystemObject")
idays = 1
sFolder = "d:\vsbackups"
Set oFolder = oFSO.GetFolder(sFolder)
If DateDiff("d", oFolder.DateCreated, Now()) > idays Then
WScript.Echo "folder """ & oFolder.Name & """will be deleted."
' oFolder.delete
End If
Dirk
"lca1630" <> schrieb im Newsbeitrag
news:2094D500-0F4D-49E9-9A60-...
> Hey Dirk,
>
> I may need to refine what the script is doing how about just deleting
> d:\vsbackups after 1 day. Thanks
>
> "lca1630" wrote:
>
> > Hello,
> >
> > I am wondering of one of you scripting wizards could help me with a
cleanup
> > script that delete all folders older than # days in the root of d:\.
> >
> > I am making backups of my live virtual servers and do not have enough
room
> > to house more than one copy at a time.
> >
> > The backups create folders that show the date and time so I have to make
> > sure it deletes all in that partition.
> >
> > Thanks.
|