代码未经过测试- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1-3 delims=-:/ " %%a in ("%date%") do set m=%%a%%b%%c
- set "rar=D:\Program Files\xerox\WinRAR\rar.exe"
- if not exist "%rar%" (echo.变量rar设置错误&pause&exit) else "%rar%" a -tn5m -inul ye %m%.txt
- if not exist ye.rar (exit) else del /q ye.rar
- for /f %%a in ('find /c /v "" ^<%m%.txt') do set end=%%a
- for /f "tokens=1* delims=:" %%a in ('findstr /n .* %m%.txt') do (
- set "a=%%b"
- if /i "!a:~5!"=="all" set set==
- if /i "!a:~5!"=="administrator" set set==
- if "!a:~0,1!"=="<" call:han "!b!"
- if %%a==%end% call:han "!b!"
- set "b=!b!|%%b^<b寒夜孤星r^>"
- )
- (for /f "tokens=2-11 delims=|" %%a in ('set k_^|sort /r') do (
- echo.%%a&echo.%%b&echo.%%c&echo.%%d&echo.%%e
- if not "%%f"=="" echo.%%f
- if not "%%g"=="" echo.%%g
- if not "%%h"=="" echo.%%h
- if not "%%i"=="" echo.%%i
- if not "%%j"=="" echo.%%j
- )
- )>%m%.html
- exit
- :han
- set "b=%~1"
- set/a n+=1
- set "k_!n!=!b!"
- if not defined set set "k_!n!="
- set "b="
- set "set="
复制代码 把“寒夜孤星”四个字去了
[ 本帖最后由 hanyeguxing 于 2010-4-24 00:31 编辑 ] |