清理c盘的方法

目录

 

1.软件清理

2.手动清理

3.代码bat清理


1.软件清理

可选软件:

  1. 磁盘分析-spacesniffer
  2. 垃圾清理-ccleaner
  3. 重复文件清理-Duplicate Cleaner
  4. 系统优化-dism++
  5. 分区助手

参考网址:https://www.zhihu.com/question/27284451

2.手动清理

手动清理c盘

原来C盘中的这些文件可以删除,难怪电脑越用越卡!

3.代码bat清理

@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

将上段代码复制到记事本中,并将记事本保存为ANSI编码的.bat文件,然后点击执行该bat文件

编码为ANSI是为了防止运行时cmd中乱码

猜你喜欢

转载自blog.csdn.net/Daisy74RJ/article/details/106725210