回复 1# helpless - @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1,* delims=^=" %%a in (test.txt) do (
- set date1=%%b
- if defined date1 (
- for /f "tokens=1,* delims=^&" %%c in ("!date1!") do (
- set user=%%c
- set date2=%%d
- for /f "tokens=1,* delims=^=" %%e in ("!date2!") do (
- set pass=%%f
- )
- )
- )
- )
- echo 取得user数据:!user!
- echo 取得pass数据:!pass!
- pause>nul
复制代码
|