本帖最后由 tmplinshi 于 2011-7-26 23:00 编辑
- @echo off
- setlocal enabledelayedexpansion
- set file="1.txt"
-
- :input
- set /p input=输入数字(少于16个数):
-
- set list=
- set count=
- for %%a in (%input%) do (
- set "list=!list!1%%a "
- set /a count += 1
- )
- if %count% gtr 15 goto input
-
- (
- for /f "usebackq delims=" %%a in (%file%) do (
- set /a n = list
- echo %%a:!n:~1!
- set list=!list:* =!
- if not defined list set list=%list%
- )
- ) >..tmp
-
- move ..tmp %file%
-
- pause
复制代码
|