使用批处理bat一键清理电脑垃圾
侧边栏壁纸
  • 累计撰写 24 篇文章
  • 累计收到 3 条评论

使用批处理bat一键清理电脑垃圾

阿零
2024-01-02 / 0 评论 / 4,577 阅读 / 正在检测是否收录...

使用记事本创建一个 清理垃圾 .bat 结尾的文件
内容保存为:

@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

20240102235230.png

文件->右键->以管理员身份运行
运行结束即完成垃圾清理,这个代码主要功能是删除一些电脑的log日志和temp缓存文件
20240102235132.png

如果出现乱码:保存时,用编码 ANSI ,就不会显示乱码了

1

评论 (0)

取消