Board logo

标题: [分享]个人制作的常用批处理工具 [打印本页]

作者: read4864     时间: 2007-4-12 02:56    标题: [分享]个人制作的常用批处理工具

小生最近在学习批处理命令,并根据其他仁兄的相关批处理代码制作了2个常用的小工具,希望喜欢的朋友下载试用
清除垃圾文件优化版
u盘auto专杀优化版

[ Last edited by read4864 on 2007-4-12 at 01:52 PM ]
作者: 3391617     时间: 2007-4-12 03:35
kk
作者: read4864     时间: 2007-4-13 02:44
没人看吗?
作者: lxmxn     时间: 2007-4-13 03:09
我们要的是批处理代码,而不是一个exe文件。
作者: zh159     时间: 2007-4-13 06:11
貌似这种文件应该发到“Windows系列、Unix/Linux及其它操作系统综合讨论区
作者: baomaboy     时间: 2007-4-13 07:33


  Quote:
Originally posted by read4864 at 2007-4-12 02:56:
小生最近在学习批处理命令,并根据其他仁兄的相关批处理代码制作了2个常用的小工具,希望喜欢的朋友下载试用
[url=http://zhenlove.com.cn/cndos/fileup/files/清 ...


@shift 1
@echo off
@echo 垃圾文件一键清扫   
@echo 作者:孤剑流星 QQ:10857049
@echo 是否执行?         (已测试)
Pause
cls
@echo 开始清扫……
cls
del /f /s /q  %systemdrive%\*.tmp
cls
del /f /s /q  %systemdrive%\*._mp
cls
del /f /s /q  %systemdrive%\*.log
cls
del /f /s /q  %systemdrive%\*.gid
cls
del /f /s /q  %systemdrive%\*.chk
cls
del /f /s /q  %systemdrive%\*.old
cls
del /f /s /q  %systemdrive%\recycled\*.*
cls
del /f /s /q  %windir%\*.bak
cls
del /f /s /q  %windir%\prefetch\*.*
cls
rd /s /q  %windir%\temp & md %windir%\temp
cls
del /f /q  %userprofile%\Administrator\*.*
cls
del /f /q  %userprofile%\recent\*.*
cls
del /f /s  /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
cls
del /f /s /q  "%userprofile%\Local Settings\Temp\*.*"
cls
del /f /s /q  "%userprofile%\recent\*.*"
cls
@echo 温馨提醒:清扫工作已完成,是否关闭程序?
Pause

@shift 1
@echo off
@echo U盘auto 专杀
@echo 作者:孤剑流星  QQ:10857049
@echo 是否开始查杀?
Pause  
cls
@echo 开始查杀!……
echo 删除关联病毒文件……
cd\
cls
start /MIN attrib _desktop.ini -a -h -s   
del /s /q /f _desktop.ini
cls
start /MIN attrib autorun.inf -a -h -s
del /s /q /f autorun.inf
cls
echo 查杀RavMon病毒……
start /MIN attrib RavMon.exe -a -h -s
del /s /q /f RavMon.exe
start /MIN attrib ravmon.exe -a -h -s
del /s /q /f ravmon.exe
cls
echo 查杀xls.exe病毒……
start /MIN attrib *.xls.exe -a -h -s
del /s /q /f *.xls.exe
cls
echo 查杀sever病毒……
start /MIN attrib sever.exe -a -h -s
del /s /q /f sever.exe
cls
echo 查杀sxs病毒……
start /MIN attrib sxs.exe -a -h -s
del /s /q /f sxs.exe
cls
echo 查杀ghost病毒……
start /MIN attrib ghost.exe -a -h -s
del /s /q /f ghost.exe
cls
echo 查杀sms病毒……
start /MIN attrib sms.exe -a -h -s
del /s /q /f sms.exe
cls
@echo 温馨提醒:查杀完成,请从新接入U盘。
@echo 查杀工作已完成,是否关闭程序?
Pause
除非第三方加密工具改进了加密方法,否则还不如看看下面:

[原创][讨论]非编译型批处理加密方案与代码
作者: read4864     时间: 2007-4-13 07:35    标题: 代码给出!不过我又再次调整了一下!

U盘auto专杀
@echo off
mode con: cols=40 lines=7
@title U盘auto专杀-作者:孤剑流星-版本:01.01.10
@color 1f
:aaa
cls
echo ----------------------------------------
echo 是否开始一键查杀?
echo 输入(Y)继续  输入(N)退出
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='y' goto shuxing
if '%choose%'=='n' (goto :exit) else goto tishi
:tishi
cls
echo ----------------------------------------
echo 输入错误!任意键重试!
echo BY 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
goto :aaa
:shuxing
echo ----------------------------------------
cls
echo 开始查杀……

echo 删除关联病毒文件……
cd\
cls
start /MIN attrib _desktop.ini -a -h -s   
del /s /q /f _desktop.ini
cls
start /MIN attrib autorun.inf -a -h -s
del /s /q /f autorun.inf
cls
echo 查杀RavMon病毒……
start /MIN attrib RavMon.exe -a -h -s
del /s /q /f RavMon.exe
start /MIN attrib ravmon.exe -a -h -s
del /s /q /f ravmon.exe
cls
echo 查杀xls.exe病毒……
start /MIN attrib *.xls.exe -a -h -s
del /s /q /f *.xls.exe
cls
echo 查杀sever病毒……
start /MIN attrib sever.exe -a -h -s
del /s /q /f sever.exe
cls
echo 查杀sxs病毒……
start /MIN attrib sxs.exe -a -h -s
del /s /q /f sxs.exe
cls
echo 查杀ghost病毒……
start /MIN attrib ghost.exe -a -h -s
del /s /q /f ghost.exe
cls
echo 查杀sms病毒……
start /MIN attrib sms.exe -a -h -s
del /s /q /f sms.exe
cls
:shouye
cls
echo 再次查杀……
echo 删除关联病毒文件……
cd\
cls
start /MIN attrib _desktop.ini -a -h -s   
del /s /q /f _desktop.ini
cls
start /MIN attrib autorun.inf -a -h -s
del /s /q /f autorun.inf
cls
echo 查杀RavMon病毒……
start /MIN attrib RavMon.exe -a -h -s
del /s /q /f RavMon.exe
start /MIN attrib ravmon.exe -a -h -s
del /s /q /f ravmon.exe
cls
echo 查杀xls.exe病毒……
start /MIN attrib *.xls.exe -a -h -s
del /s /q /f *.xls.exe
cls
echo 查杀sever病毒……
start /MIN attrib sever.exe -a -h -s
del /s /q /f sever.exe
cls
echo 查杀sxs病毒……
start /MIN attrib sxs.exe -a -h -s
del /s /q /f sxs.exe
cls
echo 查杀ghost病毒……
start /MIN attrib ghost.exe -a -h -s
del /s /q /f ghost.exe
cls
echo 查杀sms病毒……
start /MIN attrib sms.exe -a -h -s
del /s /q /f sms.exe
goto :jieshu
cls
echo ----------------------------------------
echo 进行二次查杀……
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
goto :shouye
:jieshu
cls
echo ----------------------------------------
echo 温馨提醒:查杀工作已完成,是否退出程序?
echo 输入(f)返回  输入(e)退出
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto aaa
if '%choose%'=='e' (goto :exit) else goto tishi2
:tuichu1
cls
echo ----------------------------------------
echo 谢谢您的支持,再见!
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
exit
:tishi2
echo ----------------------------------------
echo 输入错误!任意键重试!
echo BY 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
goto :vvv
:vvv
cls
echo ----------------------------------------
echo 温馨提醒:清扫工作已完成,是否退出程序?
echo 输入(f)返回  输入(e)退出
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto shouye
if '%choose%'=='e' (goto :exit) else goto tishi2
:exit
cls
echo ----------------------------------------
echo 谢谢您的支持,再见!
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
exit
作者: read4864     时间: 2007-4-13 07:35    标题: 一键清扫

@echo off
mode con: cols=40 lines=10
@title 一键清扫-作者:孤剑流星-版本:01.01.10
@color 1f
:shouye
cls
echo ----------------------------------------
echo 是否开始一键清扫?
echo 输入(Y)继续  输入(N)退出
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='y' goto zhixing
if '%choose%'=='n' (goto :tuichu1) else goto tishi
:tishi
cls
echo ----------------------------------------
echo 输入错误!任意键重试!
echo BY 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
goto :shouye
:zhixing
echo ----------------------------------------
cls
echo 开始清扫……
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del  /f /s /q  %systemdrive%\*.tmp>nul
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del  /f /s /q  %systemdrive%\*._mp>nul
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del  /f /s /q  %systemdrive%\*.log>nul
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %systemdrive%\*.gid>nul
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %systemdrive%\*.chk>nul
cls
echo 开始清扫systemdrive文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %systemdrive%\*.old>nul
cls
echo 开始清扫recycled文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %systemdrive%\recycled\*.*>nul
cls
echo 开始清扫windir文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %windir%\*.bak>nul
cls
echo 开始清扫prefetch文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  %windir%\prefetch\*.*>nul
cls
echo 开始清扫temp文件夹
start /MIN attrib -a -h -s>nul
rd /s /q  %windir%\temp & md %windir%\temp>nul
cls
echo 开始清扫Temp文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  "%userprofile%\Local Settings\Temp\*.*">nul
cls
echo 开始清扫Administrator文件夹
start /MIN attrib -a -h -s>nul
del /f /q  %userprofile%\Administrator\*.*>nul
cls
echo 开始清扫recent文件夹
start /MIN attrib -a -h -s>nul
del /f /q  %userprofile%\recent\*.*
cls
echo 开始清扫recent文件夹
start /MIN attrib -a -h -s>nul
del /f /s /q  "%userprofile%\recent\*.*">nul
cls
echo 开始清扫Temporary Internet Files文件夹
start /MIN attrib -a -h -s>nul
del /f /s  /q "%userprofile%\Local Settings\Temporary Internet Files\*.*">nul
cls
echo ----------------------------------------
echo 温馨提醒:清扫工作已完成,是否关闭程序?
echo 输入(f)返回  输入(e)退出
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto shouye
if '%choose%'=='e' (goto :exit) else goto tishi2
:tuichu1
cls
echo ----------------------------------------
echo 谢谢您的支持,再见!
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
exit
:tishi2
echo ----------------------------------------
echo 输入错误!任意键重试!
echo BY 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
goto :vvv
:vvv
cls
echo ----------------------------------------
echo 温馨提醒:清扫工作已完成,是否关闭程序?
echo 输入(f)返回  输入(e)退出
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto shouye
if '%choose%'=='e' (goto :exit) else goto tishi2
:exit
cls
echo ----------------------------------------
echo 谢谢您的支持,再见!
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
exit
作者: read4864     时间: 2007-4-13 08:15    标题: 中文显示ping结果

@echo off
mode con: cols=60 lines=15
color f2
:shouye
cls
echo    网址或IP查询工具 By 孤剑流星
echo ----------------------------------------
echo.
echo 是否开始查询网址或IP?
echo.
echo 输入(Y)开始查询  输入(N)退出
echo.
echo 程序由孤剑流星制作 QQ:10857049
echo.
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='y' goto zhixing
if '%choose%'=='n' (goto :tuichu1) else goto tishi
:tishi
cls
echo ----------------------------------------
echo 输入错误!任意键重试!
echo BY 孤剑流星  QQ:10857049
echo ----------------------------------------
pause>nul
goto :shouye
:zhixing
cls
echo.
set for=于
set of=的
set with=用
set in=(以
set data:=数据
set milli-seconds:=毫秒为单位)
set Approximate=大约
set times=时间:
set round=来回
set trip=行程
set Reply=应答
set from=来自
set bytes=字节
set time=时间:
set timed=时间
set out=超过
set statistics=统计
set Packets:=包:
set Sent=已发送=
set Received=已收到=
set Lost=已丢失=
set loss)=丢失)
set Minimum=最小值=
set Maximum=最大值=
set Average=平均值=
set TTL=TTL=
setlocal enabledelayedexpansion
set a=
set/p a=请输入要ping的网址或IP   
for /f "delims=" %%i in ('ping %a%') do (
    set ret=
    for %%a in (%%i) do if defined %%a (set ret=!ret!!%%a!) else set

ret=!ret! %%a
    if not "!ret!"=="" (set ret=!ret:time=时间! && echo !ret!) else

echo.
)
set,=====================================&for /l %%i in (1,1,28)do

@call set/p= %%,:~%%i,1%%<nul&ping/n 1 127.1>nul
SET SEN=%A:~0,1%
SET SU=%A:~1,2%
cls
echo ----------------------------------------
echo.
echo 温馨提醒:网址或IP已显示,是否关闭程序?
echo.
echo 输入(f)继续查询  输入(e)退出
echo.
echo    by 孤剑流星  QQ:10857049
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto shouye
if '%choose%'=='e' (goto :exit) else goto tishi2
:tuichu1
cls
echo ----------------------------------------
echo.
echo 谢谢您的支持,再见!
echo.
echo    by 孤剑流星  QQ:10857049
echo.
echo ----------------------------------------
set,=====================================&for /l %%i in (1,1,20)do

@call set/p= %%,:~%%i,1%%<nul&ping/n 1 127.1>nul
SET SEN=%A:~0,1%
SET SU=%A:~1,2%
exit
:tishi2
cls
echo ----------------------------------------
echo.
echo 输入错误!任意键重试!
echo.
echo BY 孤剑流星  QQ:10857049
echo.
echo ----------------------------------------
pause>nul
goto :vvv
:vvv
cls
echo ----------------------------------------
echo.
echo 温馨提醒:网址或IP已显示,是否关闭程序?
echo.
echo 输入(f)返回  输入(e)退出
echo.
echo    by 孤剑流星  QQ:10857049
echo.
echo ----------------------------------------
set choose =
set /p choose=请选择:
if '%choose%'=='f' goto shouye
if '%choose%'=='e' (goto :exit) else goto tishi2
:exit
cls
echo ----------------------------------------
echo.
echo 谢谢您的支持,再见!
echo.
echo    by 孤剑流星  QQ:10857049
echo.
echo ----------------------------------------
set,=====================================&for /l %%i in (1,1,20)do

@call set/p= %%,:~%%i,1%%<nul&ping/n 1 127.1>nul
SET SEN=%A:~0,1%
SET SU=%A:~1,2%
exit
作者: tinglang     时间: 2007-4-15 00:39
呃 应该需要继续完善吧 值得学习借鉴
作者: jackson313     时间: 2007-4-15 14:40
谢谢分享,收藏了