关于清理c盘 为什么会使电脑重启

来源:百度知道 编辑:UC知道 时间:2024/07/08 19:17:32
我用下面的这个程序清理垃圾文件,以前用的还好的,刚才一打开,电脑就自动重启了,开始以为是我安到了什么,然后才发现是这个程序的问题,谁可以告诉我为什么我运行这个会使电脑重启阿?

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 s\*.*
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\*.*"
sfc /purgecache '清理系统盘无用文件
defrag %systemd

建议还是不要用工具清楚所谓的垃圾文件,还是自己动手的好,切不可宁可误杀一千也不放掉一个。系统一定会有垃圾的,不用太惦记着。实在不行就重装,绝对干净!