用c语言编写清理c盘程序,C盘清理小程序制作

本文提供了一段批处理脚本,用于自动清理Windows系统中常见的临时文件和缓存,包括Prefetch、Cookies、历史记录等,有助于释放磁盘空间并提高系统运行效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用记事本打开,然后编辑,写入以下代码:

代码清单: @echo off

echo 正在清理系统垃圾文件,请稍等......

del /s /f /q c:windowsemp*.*

rd /s /q c:windowsemp

md c:windowsemp

del /s /f /q C:WINDOWSPrefetch

del /s /f /q %temp%*.*

rd /s /q %temp%

md %temp%

deltree /y c:windowsempor~1

deltree /y c:windowsemp

deltree /y c:windowsmp

deltree /y c:windowsff*.tmp

deltree /y c:windowshistory

deltree /y c:windowscookies

deltree /y c:windowsecent

deltree /y c:windowsspoolprinters

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%ecycled*.*

del /f /s /q ?%windir%*.bak

del /f /s /q ?%windir%prefetch*.*

rd /s /q %windir%emp & md ?%windir%emp

del /f /q ?%userprofile%cookies*.*

del /f /q ?%userprofile%ecent*.*

del /f /s /q ?"%userprofile%Local SettingsTemporary Internet Files*.*"

del /f /s /q ?"%userprofile%Local SettingsTemp*.*"

del /f /s /q ?"%userprofile%ecent*.*"

del c:WIN386.SWP

echo系统清除结束!

echo. & pause

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值