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.
Hello Tim,
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 !!!!!!!!
Ravi,
Thanks so much for the feedback! I’m glad that the scripts and plugins here help you!
Thanks!
Tim
Does it need an tweaks for Windows 10?
Ted,
I use it frequently on Win10 machines with no problem!
Thanks,
Tim
Does it clean the Downloads folder for profiles?
Philip,
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. 🙂
Thanks!
Tim
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
Philip,
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.
Thanks,
Tim
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
%appdata%\local\microsoft\windows\tempor~1
I added an additional shell line to the script that removes files from
%appdata%\local\microsoft\windows\INetCache
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.
https://www.mspgeek.com/topic/3390-disk-cleanup-project/?do=findComment&comment=26996