Set folderCollection = folder.SubFolders
For Each subFolder In folderCollection
DeleteOldFiles subFolder.Path, BeforeDate
objFSO.deleteFolder subFolder.Path
Next
-----------
The above code deletes all folders,i need to delete folders and files which are 5 days old.Plz help
I could resolve one issue ie.. it now takes windows path also ..
Now i only need how to delte empty folders after delting files inside it ..plz help :)
Hi All,
The following script is deleting only files in LOGARCHIVE folder leaving the empty folder .I want to delete empty folders even. How can i correct it. More over i get an error when it goes to 2nd path \server\lodarchive sayng path not found .Can people suggest me .
In test3.txt i gave...
Hello All,
I am planing for an automation to delete log archives older than 3 days in multiple servers .I have got 2 vb scripts 1) it will read a .txt file where all server paths are kept 2) deletes logs older than 2 days . I want to combine two vb scripts. Please look my scripts...
Hello All,
I am not a vb expert . I am planing to do an automation to delete log archives periodically from a location.we have around 100+ servers . I have got a VB script to delete folders based on path given .But i want the script to delete all archive folders in all servers . the path for...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.