今天小编要和大家分享的是命令行清理电脑垃圾,希望能够帮助到大家。
操作方法
01
首先在我们的电脑桌面上新建一个TXT格式的文件,如下图所示。
02
然后在记事本中输入@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 清除系统LJ完成!
echo. & pause
03
接着点击保存,如下图所示。
04
然后右击这个记事本并点击属性,如下图所示。
05
然后把这个文件的后缀名改为bat,如图所示。
06
接着双击这个文件,如下图所示。
07
这样操作完成,我们就会删除一些垃圾文件了。