- @echo off&setlocal enabledelayedexpansion
- copy /y a.txt $>nul
- (echo,&echo,)>>$
- (for /f "tokens=1,2* delims=:" %%a in ('findstr /n .* $') do (
- if "%%b" neq "" (
- set "%%b=%%c"&set "flag="
- ) else (
- if not defined flag (
- for %%d in (公司名 地址 邮编 电话 传真 E-mail 主页 经营范围) do echo %%d:!%%d!&set "%%d="
- echo,&set "flag=a"
- )
- )
- ))>new.txt
- start new.txt&del $
复制代码
|