联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off&Setlocal EnableDelayedExpansion set/p a=输入3位已有排号的尾号后回车 : for /f "delims=" %%i in (0.txt) do ( set /a a+=1 echo %%i>>1.txt ) echo 搞定! pause>nul
@echo off set/p a=输入6位已有排号的尾号后回车 : set a=1%a% set /a a+=1 echo %a:~-6%>>1.txt echo 搞定! pause>nul
Originally posted by moniuming at 2008-5-26 11:55: @echo off&Setlocal EnableDelayedExpansion set/p a=输入6位已有排号的尾号后回车 : for /f "delims=" %%i in (0.txt) do ( set a=1%%a set /a a+=1 echo ...
@echo off&Setlocal EnableDelayedExpansion set/p a=输入6位已有排号的尾号后回车 : for /f "delims=" %%i in (0.txt) do ( set a=1%%a set /a a+=1 echo ...
Originally posted by moniuming at 2008-5-26 11:55: @echo off&Setlocal EnableDelayedExpansion set/p a=输入6位已有排号的尾号后回车 : for /f "delims=" %%i in (0.txt) do ( set a=1%a% set /a a+=1 echo ...
@echo off&Setlocal EnableDelayedExpansion set/p a=输入6位已有排号的尾号后回车 : for /f "delims=" %%i in (0.txt) do ( set a=1%a% set /a a+=1 echo ...
谢谢您的回复, 排号只加了一次并全部用了它,如输入000111,则全部用了000112哟
Originally posted by moniuming at 2008-5-26 13:04: 请问LZ要一直往下排多少呢
@echo off Setlocal EnableDelayedExpansion for /f "delims=" %%i in (0.txt) do set a=1%%i for /f "delims=" %%i in (0.txt) do ( set /a a+=1 >>1.txt echo !a:~-6! ) pause
Originally posted by moniuming at 2008-5-26 13:49: 试试这个? @echo off Setlocal EnableDelayedExpansion for /f "delims=" %%i in (0.txt) do set a=1%%i for /f "delims=" %%i in (0.txt) do ( set /a a+=1 >> ...
@echo off Setlocal EnableDelayedExpansion for /f "delims=" %%i in (0.txt) do set a=1%%i for /f "delims=" %%i in (0.txt) do ( set /a a+=1 >> ...
@echo off Setlocal EnableDelayedExpansion type nul>1.txt for /f "tokens=1 delims=:" %%i in ('findstr /n .* 0.txt') do set a=100000%%i for /f "delims=" %%i in (0.txt) do ( set /a a+=1 >>1.txt echo !a:~-6! %%i )
@echo off Setlocal EnableDelayedExpansion set /p a=输入6位已有排号的尾号后回车 : set b=1%a% for /f "delims=" %%i in (0.txt) do ( set /a b+=1 >>1.txt echo !b:~-6! %%i )