• It makes more sense to me to use a DATEDIFF vb function instead of assuming it will add days to the returned date. This also allows you to be explicit about which date part you want; days, minutes, weeks and so on... For you Unix / Linux nerds, you may notice I am using bzip2 (a win32 port) which compresses the files much better (and free) than any PKZip variant.

    I did a little script similar to yours (I was amazed about how similar it was) about six months ago, here's what is looks like:

    Option Explicit

    Const strBackupExt = ".bak.bz2"

    Const strDir = "C:\Powerclean\Backups"

    Dim fso

    Dim vFolder as Variant

    Dim vFile as Variant

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set vFolder = fso.GetFolder(strDir)

    For each vFile in vFolder.Files

    If Right(vFile.Name, 8) = strBackupExt Then

    If DATEDIFF(d, vFile.DateLastModified, Now) > 30 Then

    vFile.Delete(True)

    End If

    End If

    Next vFile