LabTech Script: Thorough Disk Cleanup v2
Posted on March 21, 2016
Some changes have been made to the original Thorough Disk Cleanup script posted a while back, and it was requested that the new version get posted. So, here it is! You can download it below. Note that your disk cleanup will be much more effective if your disk cleanup folders are set appropriately.
Just want to say THANK YOU SO MUCH for all the work that you have been putting into making these scripts and plugins ! They are all awesome ! It makes our jobs so much easier. I run a NOC with 23 guys on the team, and a lot of the script and plugins that we got from you are just fantastic ! They all love it ! Our favorite one is the Operators Dashboard. Keep up the good work.
THANK YOU !!!!!!!!
Thanks so much for the feedback! I’m glad that the scripts and plugins here help you!
Does it need an tweaks for Windows 10?
I use it frequently on Win10 machines with no problem!
Does it clean the Downloads folder for profiles?
It does not. I would be weary about automating that as I’ve known too many business owners and doctors that keep “important” files there indefinitely. 🙂
Yeah, i can see that. I do have a doctor’s office who wants it actually. Their EHR web platform downloads a PDF each time they look at a patient record to the downloads directory and it is not needed. And in just a month’s time they will several GBs of PDFs in there. They have to go in to each computer and delete them all. Is there a modification we can make to allow it to clean that folder? Email me if need be
For a very specific situation like that on a rather limited number of computers, I would about think that a script or scheduled task running a batch file would be more useful for you. That said, I’ll add that to the wish list and update when available.
I love this script, but I have made one modification for our purposes.
The Internet Explorer cache for Windows 8.x/10 is not in the same location as it was for earlier operating systems. The Squatting Dog script removes files from
I added an additional shell line to the script that removes files from
This second location is for Windows 8.x/10 systems.
I have made modifications that both incorporate Doug (1.0)’s changes, but also check if the system is a server or an SBS box. Servers will get IIS logs cleaned up, retaining only the last 30 days. SBS boxes will have out-of-date SBS logs removed. I would be more than happy to release it to others, and will probably place it on LabTech Geek, but if SD Dev would like to see it, contact me via e-mail.
Doug did you ever post your modified script anywhere – I wanted to build on your improvements, rather than reinventing the wheel.
Hey Doug 2.0, did you ever post this on LT Geek? I went looking and couldn’t find it. Was keen to see what you did for those servers.
I know, this is very old, but here is a link to where I posted it.