1、首先在桌面新建一个txt文件,右键空白处打开菜单,选择“新建--文本文档”;
2、打开刚刚新建的txt文件,复制如下命令代码到txt文件中;
@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、然后点击“文件”打开菜单,选择“另存为”,如图所示;
4、打开“另存为”窗口后,把“保存类型”更改为“所有文件”,将“文件名”改为“文件名.bat”的形式,然后点击“保存”;
5、然后桌面出现了一个bat格式的文件;
6、点击“一键清理.bat”即可开始清理系统垃圾,等待清理完成后按任意键退出。
以上内容就是win7批处理命令清理垃圾的方法,有需要的用户可以参照上要这方法来操作,有了该bat文件就可以实现一键清理了!希望今天的分享能给大家带来帮助。
上面给大家介绍的就是关于win7系统一键清楚系统垃圾的操作方法,如果你的电脑也遇到了这种情况,可以试试上面的方法哦。更多相关教程,请继续关注我们。