用DOS命令清理C盘的垃圾文件

最好是做成一个BAT文件

  步骤如下:
  1、点击开始,点击运行,输入notepad,点击确定;
  2、打开记事本输入
@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
  3、按ctrl+s保存,输入文件名1.bat,保存类型选择所有文件,点击保存;
  4、双击1.reg,点击确定添加到注册表,重启即可。
温馨提示:内容为网友见解,仅供参考
第1个回答  2013-08-08
@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 自己保存为.bat文件咯
第2个回答  2021-03-23

第3个回答  推荐于2017-12-15
这个东西百度上面有很多,直接发你一个吧@ echo offecho 删除默认共享,请稍等........................
net share admin$ /del
net share c$ /delnet share e$ /del
net share f$ /del
net share g$ /del
net share h$ /del echo 正在清除系统垃圾文件,请稍等........................
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mpdel /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\*.*
del /f /s /q %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 清理回收站,请稍等........................
del c:\RECYCLER\*.* /f/s/q/adel e:\RECYCLER\*.* /f/s/q/a
del f:\RECYCLER\*.* /f/s/q/a
del g:\RECYCLER\*.* /f/s/q/a
del h:\RECYCLER\*.* /f/s/q/adel c:\Recycled\*.* /f/s/q/adel e:\Recycled\*.* /f/s/q/a
del f:\Recycled\*.* /f/s/q/a
del g:\Recycled\*.* /f/s/q/a
del h:\Recycled\*.* /f/s/q/a
echo 清理_desktop.ini,请稍等........................del e:\_desktop.ini /f/s/q/a
del f:\_desktop.ini /f/s/q/a
del g:\_desktop.ini /f/s/q/a
del h:\_desktop.ini /f/s/q/aecho 清除系统LJ完成!o(∩_∩)o ................
保存为BAT文件就行了本回答被网友采纳
相似回答