这个批处理文件(.bat)代码对电脑会造成误删文件吗?

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:32:13
代码为:
@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. & pause

@title 一键清理系统垃圾文件
cls
@echo 如果您正在使用的工作软件,现在一定要先保存,最好关闭掉!否则本程序将会删除您正在工作的临时文件!
@pause

上边这些也是该文件中的,正好说明了其弊端。按照说的做了,就不会有误删的情况。

这个没事的,很多人都在用,不过我还是比较推荐使用优化大师清除垃圾文件,删错了还能还原。