
@echo
offecho
在windowsshiyong使用过成中,电脑系统磁盘的可用空间一天天在减少,运行速度在变慢。为此,我特编制了这个批处理命令,用来快速清理windows临时文件(如:*.tmp、*._mp)日志文件(*.log)、临时帮助文件(*.gid)、磁盘检查文件(*.chk)、临时备份文件(如:*.old、*.bak)以及其他临时文件,保证轻松流畅上网。
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\*.*
echo
清除系统垃圾完成!
首先在自己的桌面上新建一个文本文档 右击-新建-文本文档打开文本文档
将垃圾清理批处理命令复制到文本文档中
这里,笔者参考网络上有关清理垃圾文件的文章,看看如何编制一个垃圾清理的批处理文件。
@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
将文件夹的后缀显示出来
将文本的txt后缀改成bat
双击打开 文件
等待自动清理完毕!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)