• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
敬YES
Now Or Never
博客园    首页       联系   管理    订阅  订阅
系统清理小工具

 平常清理系统什么的都是用360,超级兔子之类的,公司的机器不让装杂七六八的软件的,自己一点点清理又闲麻烦。所以经常用这段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 清除系统LJ完成!准备退出...
echo 
*********************************************************************
echo 剩余 
6
ping 
127.1 > nul
echo 剩余 
5
ping 
127.1 > nul
echo 剩余 
4
ping 
127.1 > nul
echo 剩余 
3
ping 
127.1 > nul
echo 剩余 
2
ping 
127.1 > nul
echo 剩余 
1
ping 
127.1 > null

exit 

把这段代码粘贴到记事本里,保存为.bat文件就可以了 。


 

作者:陈敬(公众号:敬YES)
出处:http://www.cnblogs.com/janes/
博客文章仅供交流学习,请勿用于商业用途。如需转载,请务必注明出处。

posted on 2011-09-20 15:41  敬YES  阅读(1104)  评论(7)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3