温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何进行C盘清理小程序制作

发布时间:2021-11-25 16:55:49 来源:亿速云 阅读:227 作者:柒染 栏目:编程语言

如何进行C盘清理小程序制作,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

引言:大家都知道,随着时间的推荐,我们电脑系统的C盘缓存的临时数据、无用数据会越来越多,这会导致我们的系统运行速度被大大拖慢,所有这里教大家怎么制作一个简单的清理C盘临时数据和无用数据的小程序。
制作步骤:

  1. 新建一个TXT文件,命名为:系统清理.bat

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

    @echo off 
    echo 正在清理系统垃圾文件,请稍等......
    del /s /f /q c:\windows\temp\*.*
    rd /s /q c:windows\temp
    md c:\windows\temp
    del /s /f /q C:\WINDOWS\Prefetch
    del /s /f /q %temp%\*.*
    rd /s /q %temp%
    md %temp%
    deltree /y c:\windows\tempor~1
    deltree /y c:\windows\temp
    deltree /y c:\windows\tmp
    deltree /y c:\windows\ff*.tmp
    deltree /y c:\windows\history
    deltree /y c:\windows\cookies
    deltree /y c:\windows\recent
    deltree /y c:\windows\spool\printers
    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\*.*"
    del c:\WIN386.SWP

    echo系统清除结束!
    echo. & pause

  3. 代码写好后保存。

  4. 使用的时候双击运行即可。

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注亿速云行业资讯频道,感谢您对亿速云的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI