是这样理解的吗?
list.txt- 1##4072.0###52.19### #504## #
- 2#38705.8# # # 51.73## #490# #
- 372###389.0##51.80##19.77# # 504#####
- 4##59.71#3715.45##497######
- 5##4072.0###52.19### #72## #
- 6#38705.8# # # 51.73## #70# #
- 772###389.0##51.80##19.77# # 72#####
- 8##59.71#3715.45##71######
复制代码 代码如下
--------------------------------------------------------------------------------------------------------------- @echo off
- for /f "delims=" %%a in (list.txt) do call :is "%%a"
- pause
- goto :eof
-
- :is
- set /a num+=1
- for /f "tokens=%num% delims=# " %%a in ("%~1") do (
- call set "var=%%var%% %%a"
- goto is
- )
- for %%a in (%var%) do set "num=%%a"
- set /a _num=7*%num%
- set "str=%~1"
- call set "str=%%str:%num%=%_num%%%"
- echo %str%
- set "num=0"
- goto :eof
复制代码
|