Search and Delete Files less than 1 hour old with vbscript

Ran into a situation where temporary created files were filling the drives of a Windows 2003 server. So I turned to vbscript and creating a scheduled task to keep the space issue at bay. Here is the script.

The script is pretty simple and can be changed to handles hours and minutes by changing the h and N variables. For under 1 hour times you need to make sure h = 0, this variable is set right after the file extention. Comments are listed in the code example above.

Hope this little script can be as much use for you as it is me.

2 Responses to “Search and Delete Files less than 1 hour old with vbscript”

  1. Bob says:

    Thanks for the script, was very useful to me

  2. joe says:

    Thank you! Thank you! Thank you! 🙂 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.