回复 11# sweet惜缘
试一试- @echo off & setlocal enabledelayedexpansion
- (for /f "tokens=1,* delims= " %%i in (NEW_DG.txt) do (
- set entry=%%i
- set target=%%j
- if "!target!" neq "~" (
- if "!target:~0,1!" equ "[" set target=!target:~1!
- if "!target:~-1!" equ "]" set target=!target:~,-1!
- if "!target:~0,3!" neq "HSA" set target=HSA:!target!
- if "!target: =!" neq "!target!" (
- for %%i in (!target!) do (
- set target=%%i
- if "!target:~0,3!" equ "HSA" (
- echo;!entry! %%i
- ) else (
- echo;!entry! HSA:%%i
- )
- )
- ) else (
- echo;!entry! !target!
- )
- ) else (
- echo;!entry! !target!
- )
- ))>222.txt
- pause & exit /b
复制代码
|