VBScript to find files in a folder (and all subfolders) older than XX days and delete them
Posted on 2014-04-09
Hello EE experts,
I am looking for a simple VBscript which I will run on a scheduled basis.
The purpose of this is to search a folder, for example, D:\Application and all it's subfolders for *.log files. Any that are older than XX days should then be deleted. I specify XX since I'm not sure how many days yet...
Also, could it be possible that I can specify an entire drive (and thereby all folders)? I never know when/if the devs might change folder structure used by the application! Perhaps this can be done by simply dropping the folder name and specifying D:\ for example?
Help greatly appreciated!