本帖最后由 aloha20200628 于 2024-3-17 15:50 编辑
回复 1# zhengwei007
用 for/f 一口气切分到位...- @echo off&setlocal enabledelayedexpansion
- (echo,NPCID aggro&for /f "delims=" %%F in ('dir /s/b/a-d *.xml') do
- for /f tokens^=1-12^delims^=^ ^"^=^< %%a in (' findstr /ilc:"npc id=" /ilc:"aggro=" "%%~F" ') do (
- if /i "%%a"=="npc id" (set "v=%%b") else if /i "%%a"=="ai type" (echo,!v! %%l)
- ))>"sour.csv"
- endlocal&exit/b
复制代码
|