It may not be possible to do exactly what you want.
The act of deleting a file in a folder automatically updates the last modifed date of the folder. So if anything is deleted, the folder will never be elegible for deletion... That is if I understand what you want.
If on the other hand, you mean just look at the last modifed date of a folder, without even looking at its contents, and delete it and the contents, that is possible.
To avoid deleting zip files:
Change line 31: If file.DateLastModified < BeforeDate Then
to
if file.DateLastModifed < BeforeDate and Right(LCase(file.Name),4) <> ".zip" then
Main Topics
Browse All Topics





by: artoaperjanPosted on 2009-07-02 at 14:15:37ID: 24767784
hi
i need to script it if u want, then i'll explain
Art