@echo off
Color 0a
Title Win7 One-click Cleaning System Garbage
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo.★☆☆★
echo.★☆☆★
echo.★☆ Clean the system junk file, please wait ... ☆★
echo★☆☆★
echo.★☆☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo cleans up junk files, and the speed is determined by the size of the computer file. When you don't see the end message
echo do not close this window.
Echo is cleaning up the system junk file, please later ...
echo Delete Patch backup directory
RD%windir%\ $HF _mig$/q/s
Echo saves the name of the patch unload folder to 2950800.txt
Dir%windir%\ $NtUninstall */a:d/b >%windir%\2950800.txt
Echo reads the folder list from 2950800.txt and deletes the folder
for/f%%i in (%windir%\2950800.txt) do rd%WINDIR%\%%I/S/q
echo Delete 2950800.txt
Del%windir%\2950800.txt/f/q
echo removes the patch installation record content (del/f/s/q%systemdrive%\*.log below has already included deleting such files)
Del%windir%\kb*.log/f/q
echo Delete the system disk directory temp file
del/f/s/q%systemdrive%\*.tmp
echo Delete the system disk directory temp file
del/f/s/q%SYSTEMDRIVE%\*._MP
echo Delete the system disk directory under Log file
del/f/s/q%systemdrive%\*.log
echo Delete the system disk directory GID file (belongs to the temporary file, the specific role is unknown)
del/f/s/q%systemdrive%\*.gid
echo removes useless files left by ScanDisk (disk Scan) in the system directory
del/f/s/q%systemdrive%\*.chk
echo Delete the system directory under the old file
del/f/s/q%systemdrive%\*.old
echo Delete useless files from Recycle Bin
del/f/s/q%systemdrive%\recycled\*.*
echo Delete the system directory backup file
del/f/s/q%windir%\*.bak
echo Delete Application temp file
del/f/s/q%windir%\prefetch\*.*
echo deletes temporary files resulting from operations such as system maintenance
RD/S/q%windir%\temp & MD%windir%\temp
echo Delete the current user's Cookie (IE)
del/f/q%userprofile%\cookies\*.*
echo Delete Temporary Internet files
del/f/s/q "%userprofile%\local settings\temporary Internet Files\*.*"
echo deletes the current user's Daily action temp file
del/f/s/q "%USERPROFILE%\Local settings\temp\*.*"
echo Delete access record (the contents of the document in the Start menu)
del/f/s/q "%userprofile%\recent\*.*"
Echo
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo★☆☆★
echo.★☆☆★
echo.★☆☆★
echo★☆☆★
echo★☆ Congratulations! Clean up all done! ☆★
echo.★☆☆★
echo★☆☆★
echo.★☆☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
echo★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
Echo.
Save the above code as a. bat file Execution!
One-click Clean Windows garbage BAT file code