标题: 本人写的删除垃圾文件
[打印本页]
作者: yiyuncao007
时间: 2008-6-28 19:31
标题: 本人写的删除垃圾文件
在mnm的帮助下终于写完了这个东东,

知道自己是菜鸟一个,拿出来献丑了
:again
@echo off
set /p var=你想现在删除系统的垃圾文件吗(输入Y或N)?
if "%var%"=="y" goto :del_
if "%var%"=="n" exit
goto :again
:del_
@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 清除系统垃圾完成!
exit
[
Last edited by yiyuncao007 on 2008-6-28 at 07:34 PM ]
作者: HAT
时间: 2008-6-28 19:43
del /f /s /q %systemdrive%\*.log
log文件是不能随便删的
作者: quya
时间: 2008-6-28 23:37
这种月经帖真是垃圾。
尤其是下边一句
rd /s /q %windir%\temp & md %windir%\temp
会造成 IIS 无法理喻的错误!搞得一些人几乎抓狂。论坛上搜索一下就会发现以前有过这种例子。
另外,与其说楼主编的,不如说抄来的,不过抄也要抄得有点水平。这种垃圾东西也抄,我无语了。
作者: yiyuncao007
时间: 2008-6-29 18:06

,楼上地,牛顿不是说过这样的话吗:“旁人都说我比别人看得远一点,其实是我站在巨人的肩膀上。”,呵呵
作者: tinlin
时间: 2008-7-11 18:14
@echo off
set /p var=你想现在删除系统的垃圾文件吗(输入Y或N)?
if "%var%"=="y" goto :del_
if "%var%"=="n" exit
@echo off
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
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\*.*
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 清除系统垃圾完成!
PAUSE
exit
作者: HAT
时间: 2008-7-11 18:27
5楼也来凑热闹了,居然把换行符一起拷贝上来了,呵呵。
作者: kgdetg1127
时间: 2008-7-11 22:27
呵呵,,笑死。。。。
作者: tinlin
时间: 2008-7-13 12:12
@echo off
set /p var=你想现在删除系统的垃圾文件吗(输入Y或N)?
if "%var%"=="y" goto :del_
if "%var%"=="n" exit
@echo off
echo 正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
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\*.*
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 清除系统垃圾完成!
PAUSE
exit
作者: driver1998
时间: 2008-7-14 10:19
不如给个美化版的:
@echo off
cls
color f0
title 系统垃圾文件清除器 修改版
echo.
echo.
echo 系统垃圾文件清除器 修改版
echo.
echo 此程序将会把系统的垃圾文件清除,要继续,请按任意键。
pause>nul
echo.
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■□□□□□□□□□□
del /f /s /q %systemdrive%\*.tmp>nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■□□□□□□□□□□
del /f /s /q %systemdrive%\*._mp>nul
cls
echo.
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■□□□□□□□□
del /f /s /q %systemdrive%\*.gid>nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■□□□□□□□□
del /f /s /q %systemdrive%\*.chk>nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■□□□□□□□□
del /f /s /q %systemdrive%\*.old>nul
cls
echo.
title 清除中......
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■□□□□□□□
del /f /s /q %systemdrive%\recycled\*.*
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■□□□□□□□
del /f /s /q %windir%\*.bak
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■□□□□□□□
del /f /s /q %windir%\prefetch\*.*
cls
echo.
title 清除中......
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■□□□□
rd /s /q %windir%\temp & md %windir%\temp>nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■□□□□
del /f /q %userprofile%\cookies\*.*>nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■□□□□
del /f /q %userprofile%\recent\*.*>nul
cls
echo.
title 清除中......
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■■■□□
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*">nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■■■□□
del /f /s /q "%userprofile%\Local Settings\Temp\*.*">nul
title 清除中......
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■■■□□
del /f /s /q "%userprofile%\recent\*.*"nul
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■■■■■■■■■■■
title 清理完成
cls
echo.
echo 清理系统垃圾完成!欢迎你再次使用此程序。
echo.
:exit
echo 请按任意键退出
pause>nul
作者: 523066680
时间: 2008-7-14 10:26
标题: 且看我转载了cn-dos的一篇文章
作者: zh159
时间: 2008-7-14 11:32
9 楼可以用call子程序来减少下面的数量
cls
echo.
echo 正在清理系统垃圾文件,请稍等......
echo.
echo 进度:■■□□□□□□□□□□
作者: 523066680
时间: 2008-7-21 11:01
3楼的话有够搞笑的
作者: zrz000
时间: 2008-7-21 12:44
真的好笑噢 .这种帖子居然也来.哈哈.