Windows CleanUp
Automated System Maintenance with Powerful Batch Scripts
Automated System Maintenance with Powerful Batch Scripts
Over time, Windows collects junk files like temporary files, logs, update caches, and more — all of which eat up storage and slow down your system. Instead of relying on third-party apps, you can use simple but powerful batch scripts to clean up your PC effectively.
In this post, we introduce two handy scripts: cleanup.bat and windows clean.bat. They’re fast, safe, and lightweight tools to help you reclaim space and boost performance.
🧹 cleanup.bat – The All-Round Cleaner
This script targets various areas like user temp files, system temp files, Windows update cache, and more.
🔧 What it does:
Deletes contents of C:\Windows\Temp and %TEMP%
Clears Windows Update download cache
Deletes Prefetch files
Disables hibernation (removes hiberfil.sys)
Deletes all restore points
Empties Recycle Bin
Restarts Explorer for a fresh UI
✅ Best For: General users who want to clean most junk files in one go.
🧼 windows clean.bat – Deep System Cleaning
This script takes it a step further by stopping system services during cleanup to safely remove locked files. It also includes advanced cleanup using DISM.
🛠️ What it cleans:
Windows Temp directory
Update cache in SoftwareDistribution
Windows update backup files using DISM
Prefetch files
Log files under C:\Windows\Logs
Windows Error Reporting dumps
🔐 It also handles:
Temporarily stops services like wuauserv, bits, and cryptsvc
Restarts services after cleanup
🔄 Bonus: DISM Command Used
$$CODE0$$
This command reduces WinSxS bloat and frees GBs of space.
📦 Compress Windows System Files (Extra Feature)
Want to take it even further? Add this line to compress Windows binaries:
$$CODE1$$
Benefits:
Shrinks Windows system files to save more disk space
No performance impact on modern systems
Especially useful for low-storage devices
Note: CompactOS is natively supported on Windows 10/11.
⚠️ Important Tips
Always run the scripts as Administrator
Make sure you don’t have important files in Temp folders or Recycle Bin
These scripts have no confirmation prompts — be cautious
📥 How to Use
1. Open Notepad
2. Paste the script content
3. Save as `.bat` file (e.g., cleanup.bat)
4. Right-click → Run as Administrator
🚀 Final Thoughts
These batch scripts are a no-nonsense way to clean, optimize, and compress your system — without installing anything. Whether you're a power user or just cleaning your PC, they’re essential tools for regular maintenance.
Stay clean. Stay fast. 💻🧼
Ratings & Comments
0 Comments