使用bat批处理命令清理windows

使用bat批处理命令清理windows

游戏|数码彩彩2023-12-11 7:32:52357A+A-

相信大家都知道bat格式文件是批处理文件,是一种简化的脚本语言。最近有笔记本win系统用户向小编反映,在win系统上如何做到像智能手机一样一键清理垃圾呢?当然可以了,我们可以使用批处理命令就可以做到,下面请大家跟小编一起来学习一下win批处理命令清理垃圾的方法。

方法/步骤:

1、首先在桌面新建一个txt文件,右键空白处打开菜单,选择“新建--文本文档”;

 

使用bat批处理命令清理windows

 

 

2、打开刚刚新建的txt文件,复制如下命令代码到txt文件中;

 

使用bat批处理命令清理windows

 

 

@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% ecycled*.*

del /f /s /q %windir%*.bak

del /f /s /q %windir%prefetch*.*

rd /s /q %windir% emp & md %windir% emp

del /f /q %userprofile%cookies*.*

del /f /q %userprofile% ecent*.*

del /f /s /q “%userprofile%Local SettingsTemporary Internet Files*.*”

del /f /s /q “%userprofile%Local SettingsTemp*.*”

del /f /s /q “%userprofile% ecent*.*”

echo 清除系统LJ完成!

echo. & pause

3、然后点击“文件”打开菜单,选择“另存为”,如图所示;

 

使用bat批处理命令清理windows

 

 

4、打开“另存为”窗口后,把“保存类型”更改为“所有文件”,将“文件名”改为“文件名.bat”的形式,然后点击“保存”;

 

使用bat批处理命令清理windows

 

 

5、然后桌面出现了一个bat格式的文件;

 

使用bat批处理命令清理windows

 

 

6、点击“一键清理.bat”即可开始清理系统垃圾,等待清理完成后按任意键退出。

 

使用bat批处理命令清理windows

 

 

以上就是win批处理命令清理垃圾的方法的全部内容了,有了该bat文件就可以实现一键清理了!有需要的win用户不妨试试此方法。
 

点击这里复制本文地址 版权声明:本文内容由网友提供,该文观点仅代表作者本人。本站(https://www.angyang.net.cn)仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

昂扬百科 © All Rights Reserved.  渝ICP备2023000803号-3网赚杂谈