Every day, a large amount of system junk is generated within the system. When your system partition gets mysteriously filled up, what do you choose to do... install optimization software to automatically clean up system junk? Or manually clean it based on online tutorials? The former could potentially cause system failures and requires installing additional software, while the latter has a technical threshold and involves complicated operations. Open "Notepad" and write a few lines of batch processing! Soon, you'll have the most "green" garbage cleaning tool in history.
Wanted: The Most Common Junk Files
Among the junk files produced during the daily use of Windows, which culprits play the "leading roles"? (See the table below.)
Extension Type Cause of Generation
TMP/_MP Temporary Files Generated when installing software or during software operation
LOG Log Files Written to the hard drive during software operation/errors
GID Help Index Temporary index generated when using the help system
CHK Disk Check Files Data attempted to be recovered by the system during unexpected restarts when checking the disk
OLD/BAK Temporary Backup Files Temporary files generated during software installation/upgrade
Develop Your Own Cleaning Tool in One Minute
Don't think developing software is so mysterious. Using the built-in batch processing feature of the system, you can develop your own cleaning tool in just one minute. Open "Notepad" and write the cleaning code according to the rules below. After completion, save the file name as "cleansys.bat". You can choose any file name, but the extension must be "BAT" (otherwise, the system won't let you execute it!). If you're too lazy to DIY, you can also directly download the ready-made program from http://work.newhua.com/cfan/200623/greensys.rar. Just double-click and run it when you need to clean up.
@echo off
del /f /s /q %systemdrive%*.tmp
del /f /s /q %windir%*.bak
del /f /s /q "%userprofile%Local SettingsTemp*.*"
Small Tip
The command "del /f /s /q" means deleting all files, including read-only files, in all subdirectories without requiring confirmation. "%systemdrive%" and others are system variables, and the system will automatically recognize and point to the correct directory.