VB script to Delete folders with a name that contains a date
Posted on 2009-04-03
I need a script that will allow me to remove folders older than 1 year according to the date string in the NAME of the folder (not the actual date of the folder). The script needs to be run daily and I need to be able to remove the folder and any sub-folders/files under it.
I have some logs that need to be retained for one year. They are contained in folders. These folders have been moved to a location on the network in one batch move (they all now have the same creation date). The folders have a naming structure as follows: APP09_01012008.
I have scripts that will allow me to delete folders according to the date using the creation date time stamp but I cant figure how to use a date format in a folder name string and increment it.