Develop your own system garbage removal tool

Source: Internet
Author: User
Tags log log backup

The system will generate a lot of garbage every day, when your system partition is filled with inexplicable, you will choose how to do ... is installing the optimization software to automatically clean the system garbage? or according to the online tutorial manual cleaning? The former is likely to cause system failures, but also to install software, the latter has the technical threshold, cumbersome operation. Open "Notepad", write a few lines of batch processing bar! You will soon have the most "green" garbage removal tool in history.

Wanted most common junk files

In the garbage files that are generated in the daily use of Windows, which of the guys suddenly plays the "important role"? (see table below)

Name of extension type causes
TMP/_MP temporary files when installing software/software operations
Log log file software operation/error write to hard disk
GID Help index The temporary index produced when using the Help system
CHK disk Check file unexpectedly Restart check disk, the system tries to recover the data
Old/bak temporary files generated during installation/upgrade of the interim backup files software

Old/bak temporary files generated during installation/upgrade of the interim backup files software

One minute to develop your own cleaning tools

Do not imagine the development software so mysterious, with the system from the batch, in just a minute you can develop a cleaning tool. Open Notepad, write the cleanup code according to the following rules, save the file name as "Cleansys.bat" when it is finished, and the filename can be taken, but the extension must be "bat" and double-click to run when you need to clean it.

@echo off

del/f/s/q%systemdrive%*.tmp

del/f/s/q%windir%*.bak

del/f/s/q "%userprofile%local settingstemp*.*"

Tip: where "del/f/s/q" means deleting all files that include read-only files in all subdirectories, and does not require confirmation, "%systemdrive%" is a system variable and the system identifies itself and points to the correct directory.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.