- ·上一篇文章:for语句中的几种分隔符形式
- ·下一篇文章:Norton Ghost批处理命令用法详细介绍
hitme批处理集合
!n%%i! 00 goto:loop findstr /m "!m%%i!!n%%i!" tmp.txt 2>nul >nul && goto :loop echo !m%%i!!n%%i!>>tmp.txt ) endlocal setlocal ENABLEDELAYEDEXPANSION for /f %%i in ('sort tmp.txt') do ( set n=%%i set m=!m! !n! ) del tmp.txt cls echo. echo.¥100000000000000000000000000000000000000000.00 echo. echo. Hitme,29选7必中,号码是 !m! echo. echo.¥100000000000000000000000000000000000000000.00 echo. set /p x=保留号码至num.txt[y/n] if /i [%x%] [y] (echo !m!>>num.txt && endlocal && goto :start) else (endlocal && goto :start) 29x7.rar 23. 6+1 @echo off setlocal ENABLEDELAYEDEXPANSION cls del num.txt 2>nul :loop for /l %%i in (1,1,7) do ( echo %random% >nul set n%%i=!random:~-1! ) set num=%n1%%n2%%n3%%n4%%n5%%n6%%n7% echo. echo.*********************************** echo Hitme,6+1必中,号码是%num% echo.*********************************** echo. set /p x=保留号码至num.txt[y/n] if /i %x% y (echo %num%>>num.txt && goto :loop) else (goto :loop) endlocal 6+1.rar 24. @echo off :start setlocal ENABLEDELAYEDEXPANSION :loop_a del tmp*.txt 2>nul for /l %%i in (1,1,6) do ( echo %random% >nul set /a s%%i=!random:~-1! echo %random% >nul set /a g%%i=!random:~-1! if "!s%%i!" "0" (set /a _VAR_=!g%%i! / 3) else (set /a _VAR_=!s%%i!!g%%i! / 3) if "!_VAR_:~1,1!" "" set _VAR_=0!_VAR_! findstr /m "!_VAR_!" tmp.txt 2>nul >nul && goto :loop_a if "!_VAR_!" "00" (echo 33>>tmp.txt) else (echo !_VAR_!>>tmp.txt) ) sort tmp.txt>tmp1.txt endlocal :loop_b setlocal ENABLEDELAYEDEXPANSION echo %random% >nul set /a s=!random:~-1! echo %random% >nul set /a g=!random:~-1! if "!s!" "0" (set /a _VAR_=!g! / 6) else (set /a _VAR_=!s!!g! / 6) if "!_VAR_:~1,1!" "" set _VAR_=0!_VAR_! echo ^|>>tmp1.txt if "!_VAR_!" "00" (echo 16>>tmp1.txt) else (echo !_VAR_!>>tmp1.txt) endlocal :echo setlocal ENABLEDELAYEDEXPANSION for /f %%i in (tmp1.txt) do ( set n=%%i set m=!m! !n! ) del tmp*.txt cls echo. echo.¥1000000000000000000000000000000000000000000.00 echo. echo. Hitme,双色球必中,号码是 !m! echo. echo.¥1000000000000000000000000000000000000000000.00 echo. :save set /p x=保留号码至num.txt[y/n] if /i [%x%] [y] (echo !m!>>num.txt && endlocal && goto :start) else (endlocal && goto :start) ab.rar 25. & for windows2000+ @echo off :run for /F "tokens=2" %%i in ('netstat -e ^| find "Bytes"') do set down1=%%i for /F "tokens=3" %%i in ('netstat -e ^| find "Bytes"') do set up1=%%i ping -w 850 -n 1 1.1.1.1 2>nul >nul for /F "tokens=2" %%i in ('netstat -e ^| find "Bytes"') do set /a down=(%%i-%down1%)/1024 for /F "tokens=3" %%i in ('netstat -e ^| find "Bytes"') do set /a up=(%%i-%up1%)/1024 cls echo Down %down% KB echo Up %up% KB title %down% KB Down %up% KB Up goto:run -------------------------------------- @echo off start /wait regedit /e tmp1.txt "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices\" for /f "tokens=3 delims=\:" %%i in ('find "\\DosDevices\\" tmp1.txt') do echo %%i >>tmp2.txt setlocal ENABLEDELAYEDEXPANSION for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do find "%%i" tmp2.txt 2>nul >nul|| set n=!n!:,%%i echo freedrv=!n:~2! endlocal pause att-1.rar 26. TOP10 功能:列出特定目录下最新目录名TOP10 可以利用ftp登录显示最近更新的东西,方便抓取特定目录到最近更新的目录 测试 用法,cmd下 t_ls /top数量 目录名 1,以为if不能else,原来else (要带个空 2,%var:~n,m% 3,more +n| 去掉前几行,嘿,在管道里没有more作用 4,setlocal ENABLEDELAYEDEXPANSION ,在for里可以用累“加”了。 5,%var:string1=string2% 替换 6,!var! 用在delayedexpansion @echo off cls echo. echo.....列表中....请少等 echo. if "%1" "" goto :syntax if "%1" "/?" goto :syntax if "%1" "/" goto :syntax if "%1" "?" goto :syntax if "%1" "/help" goto :syntax setlocal ENABLEDELAYEDEXPANSION :input set n=%1 if "%n:~0,1%" "/" ( for /l %%i in (0,1,%n:~1%) do set var=!var! %%i:. set m=%* set m=!m:%n% =!) else ( for /l %%i in (0,1,10) do set var=!var! %%i:. set m=%* ) :head (echo.^<head^> echo.^<title^>列表目录下最新目录名TOP10^</title^> echo.^<meta http-equiv="Content-Type" content="text/html^; charset=gb2312" ^/^> echo.^<style type="text/css"^> echo.^<!-- echo.a:active { text-decoration: none ; color: red ; font-size: 12pt } echo.a:visited { text-decoration: none ; color: green ; font-size: 12pt } echo.a:link { text-decoration: none ; font-size: 12pt } echo.--^> echo.^</style^> echo.^</head^> echo.^<h1^> 列表目录下最新目录名TOP10 ^</h1^> echo. written by hitme 2005.9.3 echo.^</br^>)>list.htm :list for /f "delims=" %%i in ('dir "!m!\" /ad/b/tc/o-d^|more +0 ') do (
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] 下一页
hitme批处理集合