VBScript or Visual Basic Scripting Edition is a Microsoft development. It was created as a scripting language that has its foundations in Visual Basic.
I am looking for an a script (cant find one exactly on the web) that will delete a folder and all its contents based on creation date. For example, I have a folder containing 30 or more folders of log files, 1 for each day of the month. I would like to keep the last 2 folders from the current date, then delete all folders / subfolders that are older than that so in the example below the 8th and 9th would be gone and the rest remain. <DIR> 20220508 <DIR> 20220509 <DIR> 20220510 <DIR> 20220511 <DIR> 20220512 I want to reassert. Lots of scripts out there. Not all bullet proof. Looking for something that works consistently so i don't have to manually delete these folders to keep the size of the drive low.