
不想了,直接把空格替换掉,谢谢了CODE: [Copy to clipboard]这个是拖放执行的,直接把你的要加序号的文本,拖放到这个批处理上面,支持多文件。@echo off&color a&setlocal enabledelayedexpansion
for %%a in (%*) do (
set /a n+=1
set file!n!=%%a
)
for /l %%b in (1 1 %n%) do (
for /f "tokens=* delims=" %%c in ('type !file%%b!') do (
set /a m+=1
if "!m:~1,1!"=="" if not "!m:~0,1!"=="" set forestr=000
if "!m:~2,1!"=="" if not "!m:~1,1!"=="" set forestr=00
if "!m:~3,1!"=="" if not "!m:~2,1!"=="" set forestr=0
echo !forestr!!m!,%%c>>!file%%b!.txt
)
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |