For quite a while I had been curious as to why a simple method to do this was not available. CCLEANER and others do not do everything needed. Well, the following .VBS originated with the excellent David Barrett ( http://www.cedit.biz ) and has been rewritten a lot by yours truly (JEB of Ponderworthy). One thing discovered along the way, is even in XP there is a user profile called the “System Profile” — XP has it in
C:\WINDOWS\System32\config\systemprofile — and malware often dumps junk into it, and sometimes many gigs of unwanted files can be found in its temporary storage. The below cleans all user profiles including those, as well as the Windows Error Reporting cache, and the .NET caches, and the system TEMP folders, and in recent versions, many Windows log files which are often found in many thousands of fragments on drives.
The tool is designed for Windows 10 down through XP. If you’re running this tool on Vista/2008 or above, do use an administrative CMD or equivalent, or most of the deletions won’t happen.
The full text can be downloaded here in a zip file.