It's easy to join and it's free. Register now while it's still free! Already a member? Close this window and log in. Join Us Close. Join Tek-Tips Forums! Join Us! By joining you are opting in to receive e-mail. Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Students Click Here. I know you mention logs and empty folders but I'm worried it may delete actual data that hasn't been accessed in 30 days. Yes, it will delete all files older than 30 days. But if you want to delete only certain file types you can do this: 1. Edit line 20 so it says If dateDiff "d",objFile.
Delete And that should delete only files that end with. You need to add to the description that his "permanently" deletes not sent to recycle bin and also that it deletes empty folders unless the last 3 lines of code before the end statement are commented out.
I didn't review the code carefully before I tested on the directory I was going to use it with and it deleted all my sub directories which was all of them because they were empty. Sorry that happened to you. I have this script scheduled daily after a good backup. Otherwise yes you're screwed. Hi there, normally a C writer. How could I implement this code but to specifically target certain file types i.
Many thanks. Get the code. Source Code This script has not been checked by Spiceworks. Please understand the risks before using it. CreateObject "Scripting. Path Next End Function. Join or Login to share what you think! Rafi Nov 8, at UTC. Long path tool can helpful on this situation. You can download it from google.
Jeff Nov 10, at UTC.
0コメント