手把手为你讲解Win7自己动手清理系统垃圾文件的方法。

在我们日常使用电脑的过程中,遇到电脑出现卡顿或者网速不流畅,我们都会习惯性的打开杀毒软件,清理下系统的垃圾文件和缓存文件,那么我们能不能自己动手清理系统垃圾文件呢?下面小编就来给大家分享下Win7自己动手清理系统垃圾文件的方法。

1、首先了解下DEL命令:打开cmd,输入DEL /?出现以下解释:

Win7自己动手清理系统垃圾文件的方法

2、新建一记事本(后缀为.txt),重命名,在这命名为“清除系统垃圾.txt”,输入以下程序:

  1. 01@echo off
  2. 02echo 请勿关闭本窗口!
  3. 03echo 正在清除系统垃圾文件,请稍等......
  4. 04del /f /s /q %systemdrive%\\*.tmp
  5. 05del /f /s /q %windir%\\prefetch\\*.* rd /s /q %windir%\\temp & md %windir%\\temp
  6. 06del /f /s /q "%userprofile%\\Local Settings\\Temp\\*.*"
  7. 07del /f /s /q %systemdrive%\\*._mp
  8. 08del /f /s /q %windir%\\*.bak
  9. 09del /f /s /q %systemdrive%\\*.log
  10. 10del /f /s /q %systemdrive%\\*.gid
  11. 11del /f /s /q %systemdrive%\\*.chk
  12. 12del /f /s /q %systemdrive%\\*.old
  13. 13del /f /s /q %systemdrive%\\recycled\\*.*
  14. 14del /f /q %userprofile%\\cookies\\*.*
  15. 15del /f /q %userprofile%\\recent\\*.*
  16. 16del /f /s /q "%userprofile%\\Local Settings\\Temporary Internet Files\\*.*"
  17. 17del /f /s /q "%userprofile%\\recent\\*.*"
  18. 18echo 清除系统垃圾完成!

复制代码

@echo off
echo 请勿关闭本窗口!
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\\*.tmp
del /f /s /q %windir%\\prefetch\\*.* rd /s /q %windir%\\temp & md %windir%\\temp
del /f /s /q "%userprofile%\\Local Settings\\Temp\\*.*"
del /f /s /q %systemdrive%\\*._mp
del /f /s /q %windir%\\*.bak
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 /q %userprofile%\\cookies\\*.*
del /f /q %userprofile%\\recent\\*.*
del /f /s /q "%userprofile%\\Local Settings\\Temporary Internet Files\\*.*"
del /f /s /q "%userprofile%\\recent\\*.*"
echo 清除系统垃圾完成!

3、根据上面的解释,就可以差不多了解以上程序的含义了。差不多的意思是,在安静模式下,删除一个或多个文件或者目录列表中只读文件和所有子目录中的指定的文件,删除全局通配符时,不要求确认。

4、保存文件,然后对记事本 “清除系统垃圾.txt”进行重命名,只要把后缀.txt改为后缀.bat,此时会弹出“如果改变文件扩展名,可能会导致文件不可用,确实要更改吗?”的提示,直接点击”是“,就创建好了带DEL命令的bat批处理文件(文件缩略图显示为两个齿轮)。

5、最后,只要双击运行此bat批处理文件即可清理系统垃圾了,清除完之后会自动退出。

Win7自己动手清理系统垃圾文件的方法

以上就是Win7自己动手清理系统垃圾文件的方法,用户们可以将这个文件放在桌面上,需要用到时点击即可使用。

本文来自网络投稿,来自作者windows系统。不代表酷牛网立场,如若转载,请注明出处:https://www.xukn.com/1362798.html

(0)
上一篇 2019-04-12
下一篇 2019-04-12

相关推荐