Jump to content

GtaIon

Members
  • Posts

    1
  • Joined

  • Last visited

Reputation

0 Neutral

About GtaIon

  1. IF it were me, I would probably just make a Sub procedure to do a recursive look through all of the sub directories. I haven't tested this, but it would probably just call a sub after line 38 or the word "next". It would probably look something like the following. CleanSubFolders objFileSystem.GetFolder(strFolder) Sub CleanSubFolders(Folder) For Each Subfolder in Folder.SubFolders Set objFolder = objFileSystem.GetFolder(Subfolder.Path) Set colFiles = objFolder.Files For Each objFile in colFiles If objFile.DateLastModified < (Date() - intDays) then objTextStream.WriteLine objFile.name & vbtab & vbtab & vbtab & "created on: " & objFile.DateCreated objFile.Delete true End if Next CleanSubfolders Subfolder Next End Sub
×
×
  • Create New...