这个是测试用的,用时把绿色的删掉,把红色改为你要处理的文件吧
@goto :begin
14139
127F36D53863C8EF53C6426E948BFDF6
08744
E81EC2AFD5CFF35CE2D033EBB9558BC3
:begin
@echo off&setlocal enabledelayedexpansion
for /f "tokens=*" %%a in (%~0) do (
set str=%%a
if "!str:=!" neq "!str!" (
set "str=!str: =!
set var=!str:~5,-6!
)
if "!str:=!" neq "!str!" (
set "str=!str: =!
echo mkey=!str:~6,-7!^&mid=!var!^&bid=!var!^&ask=!var!
)
)
pause
-
- @goto :begin
- <mid>14139</mid>
- <mkey>127F36D53863C8EF53C6426E948BFDF6</mkey>
- <mid>08744</mid>
- <mkey>E81EC2AFD5CFF35CE2D033EBB9558BC3</mkey>
- :begin
- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=*" %%a in (%~0) do (
- set str=%%a
- if "!str:<mid>=!" neq "!str!" (
- set "str=!str: =!
- set var=!str:~5,-6!
- )
- if "!str:<mkey>=!" neq "!str!" (
- set "str=!str: =!
- echo mkey=!str:~6,-7!^&mid=!var!^&bid=!var!^&ask=!var!
- )
- )
- pause
复制代码
[ 本帖最后由 netbenton 于 2009-5-31 23:04 编辑 ] |