清除垃圾文件

新建TXT文件夹,将下面的代码复制到文件中,然后将txt文件后缀名改为bat,双击运行即可清除垃圾文件。

方式1

@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 清除垃圾文件成功! 
echo. & pause 

方式2:

@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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

susan花雨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值