本帖最后由 weichenxiehou 于 2011-7-26 21:04 编辑
- @echo off&setlocal enabledelayedexpansion
- :main
- cls
- set/p nums=Please input the numbers(not more than 16 nums) to be added,separated by spacebar:
- set /a n=0,m=0
- for %%i in (%nums%) do set #!n!=%%i&set/a n+=1
- if %n% gtr 15 goto :main
- (for /f "delims=" %%j in (test.txt) do (
- set /a num=m%%n
- for %%c in (!num!) do echo,%%j:!#%%c!
- set /a m+=1
- ))>new.txt
复制代码
|