One-click Clean Windows garbage BAT file code

Source: Internet
Author: User

@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

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.