window系统清理垃圾代码

@echo off

echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo 清除系统LJ完成!
echo. & pause

 

 

@echo off

title 现在时间是:%time%

echo 清空IE临时文件目录...

::del /q /s /f C:\Users\Admin\AppData\Local\Microsoft\Windows\Temporary Internet Files\

::del /f /s /q "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\"

del /q /s /f %LOCALAPPDATA%\Microsoft\Windows\Tempor~1\

cls

echo.

echo 清理IE缓存完毕...........

del /f /s /q "%temp%\"

::rd /s /q %windir%\temp & md %windir%\temp

::cls

echo.

echo 清除系统临时文件完成!

::pause>nul

::start explorer.exe "http://www.baidu.com/"

::dir /b /s C:\*yt.pdf

IF EXIST C:\*yt.pdf (

goto aa

) ELSE (

echo.

echo 没有找到文件。。。4秒后退出。。。

echo.

ping 127.1 -n 4 >nul

exit

)

:aa

cls

echo.

echo 开始清理PDF文件

echo.

del /q /s C:\*yt.pdf

echo.

echo 文件以及删除......6秒后......退出......

echo.

ping 127.0.0.1 -n 6 >nul

posted @ 2020-08-09 14:13  真紫艳星光  阅读(808)  评论(0)    收藏  举报