简单的办法,把26段全部定义了,空的变量不会显示- @echo off
- cls
- set mulu=C:\Users\pc\Desktop
- for /f "tokens=1-26 delims=*" %%a in (%mulu%\1.txt) do (
- set a=%%a
- set b=%%b
- set c=%%c
- set d=%%d
- set e=%%e
- set f=%%f
- set g=%%g
- set h=%%h
- set i=%%i
- set j=%%j
- set k=%%k
- set l=%%l
- set m=%%m
- set n=%%n
- set o=%%o
- set p=%%p
- set q=%%q
- set r=%%r
- set s=%%s
- set t=%%t
- set u=%%u
- set v=%%v
- set w=%%w
- set x=%%x
- set y=%%y
- set z=%%z
- )
- echo %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z%
- pause
复制代码
|