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