A batch suitable for clearing junk files in win7

Source: Internet
Author: User

Open notepad, copy and download the following code, and save it as "clear system spam. bat" (double quotation marks not included)

) Double-click to run the task ~~~

--------- Copy the following code -----------
@ Echo off
Color 0a
Title clear Windows 7 junk -www.waitalone.cn
Echo clears junk files, depending on the size of computer files. When no end information is displayed
Echo. Do not close this window.
Echo is clearing the System junk file. Please wait ......
Echo deletes the patch backup directory
RD % windir % $ hf_mig $/Q/S
Echo saves the name of the patch folder to 2950800.txt
Dir % windir % $ NtUninstall */a: d/B> export windir1_2950800.txt
Echo reads the folder list from 2950800.txt and deletes the folder
For/f % I in (%windir00002950800.txt) do rd % windir % \ % I/s/q
Echo Delete 2950800.txt
Del %windir%2950800.txt/f/q
Echo deletes the patch installation record content (the following del/f/s/q % systemdrive % *. log already contains

Delete such files)
Del % windir % KB *. log/f/q
Echo deletes temporary files in the System Disk directory
Del/f/s/q % systemdrive % *. tmp
Echo deletes temporary files in the System Disk directory
Del/f/s/q % systemdrive % *. _ mp
Echo deletes the log files in the System Disk directory.
Del/f/s/q % systemdrive % *. log
Echo deletes the GID file in the System Disk directory (which is a temporary file and has an unknown role)
Del/f/s/q % systemdrive % *. gid
Echo deletes useless files left by scandisk (Disk scan) in the system directory
Del/f/s/q % systemdrive % *. chk
Echo deletes the old file in the system directory
Del/f/s/q % systemdrive % *. old
Echo deletes useless files from the recycle bin
Del/f/s/q % systemdrive % ecycled *.*
Echo deletes backup files in the system directory
Del/f/s/q % windir % *. bak
Echo deletes temporary Application Files
Del/f/s/q % windir % prefetch *.*
Echo deletes temporary files generated by system maintenance and other operations
Rd/s/q % windir % emp md % windir % emp
Echo deletes the COOKIE (IE) of the current user)
Del/f/q % userprofile % cookies *.*
Echo deletes Temporary internet Files
Del/f/s/q "% userprofile % local settingsemporary internet files *.*"
Echo deletes temporary files for daily operations of the current user
Del/f/s/q "% userprofile % local settingsemp *.*"
Echo deletes an access record (content in the document in the Start menu)
Del/f/s/q "% userprofile % ecent *.*"
Echo
Echo clears the system spam file batch processing system, and the execution is complete. Thank you for using it.
Echo
Echo. pause

 

 

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.