Hi, I have a Folder Collection.
The name of the folders is the date they where created.
How can I sort the collection, so that the oldest folder is first and so on?
Or if that is not possible how can I get the name of the oldest folder?
I don't think you can sort the contents of FSO, but you could insert the results in a db, or you might be able to do some magic with the dictionary object...
This is not a bug - it's an undocumented feature...
;-)
I was going to,
but I had to code my Idea first. Here it is:
getoldestBackup = Date()
For each Folder in objRootFolder.SubFolders
If getoldestBackup < cdate(Folder.Name) then
getoldestBackup = cdate(Folder.Name)
End If
next
once it's done I'll have the date of the oldest Backup. That's all I needed. Because now I have a function that keeps calling itself and delets the oldes backup until only 5 are left.
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.