windows系统垃圾文件如何解决

关闭系统还原,,关闭休眠功能,再
@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文件.可以节省一些.但还是没有解决全部问题.系统还是在很十来分钟内能产生不少垃圾文件空间又450m变成350m.该问题还在探索中
而之前我发现的删除指定文件的操作,可以为ftp站点服务,因为到了一定的时候,ftp站点就会可能被上传很多没有用的文件,例如一个单位的"公共空间",则可以这样删除,以下制作成bat文件,并在系统的计划任务中指定时候运行,如星期天晚上11点
'---------------------------------------------------------------------
'这里典型的例子是"del_file d:\ftpfile\"执行,最后不要忘记加"\"才能成功删除d:\ftpfile中的文件和子目录。
 
attrib -s -h -r %1*.* && del %1*.* /q
dir %1 /ad /b /s >del.txt
for /f %%i in (del.txt) do rd %%i /s /q
@echo off

原文地址:https://www.cnblogs.com/pyman/p/1217179.html