联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off >b.txt type nul for /f "tokens=1-2 delims==" %%a in (a.txt) do ( if "%%b" equ "" ( >>b.txt echo %%a ) else ( set str=%%b setlocal enabledelayedexpansion if "!str:~1,1!" neq ":" ( >>b.txt echo %%a=%%b ) else ( >>b.txt echo %%a=e!str:~1! ) endlocal ) ) move /y b.txt a.txt
@echo off >b.txt type nul for /f "tokens=1* delims=:" %%a in (a.txt) do ( if "%%b" equ "" ( >>b.txt echo %%a %%b ) else ( set str=%%b set atr=%%a setlocal enabledelayedexpansion if "!str:~0,1!" neq "\" ( >>b.txt echo %%a:%%b ) else ( >>b.txt echo !atr:~0,-1!E:%%b ) endlocal ) ) move /y b.txt a.txt
@echo off&setlocal enabledelayedexpansion cd.>b.txt for /f "delims=" %%i in (a.txt) do ( set /a n+=1 set str1=%%i set str2=!str1::\=! if "!str1!" neq "!str2!" goto lp >>b.txt echo %%i ) :lp for /f "tokens=1* delims=:" %%i in ("%str1%") do set str=%%i&set E=%%j >>b.txt echo %str:~0,-1%E:%E% >>b.txt more +%n% a.txt move /y b.txt a.txt