也许有错误,错误在计算方法上也许错误文化有限看不懂这个数值
一般可以看得懂代码和移位类似,支持超过for变量占用超出分列,但是不能超过最大变量字符数
只看方法吧
- @echo off&&setlocal enabledelayedexpansion
- set "[set]=10 20 30 40 50 60 80"
- for /l %%n in (1,1,8192)do (
- for /f "tokens=1,* delims= " %%i in ("![set]!")do (
- set "[set]=%%j"&&set/a "[set][n]+=1"
- for /f "delims=" %%n in ("![set][n]!")do set "[set][new][%%n]=%%i"
- )
- )
- for /f "delims=" %%i in ('type "新建文本文档 (4).txt"')do (
- set "[type]=%%i"&&set "[type][n]="&&set "[true]="
- for /l %%n in (1,1,![set][n]!)do (
- for /f "tokens=1,* delims= " %%i in ("![type]!")do (
- set "[type]=%%j"&&set/a "[type][n]+=1"
- for /f "delims=" %%n in ("![type][n]!")do (
- set "[calc]=%%i/![set][new][%%n]!"
- call :[calc]
- if defined [true] (
- set "[true]=![true]! ![calc][new]!"
- )else (
- set "[true]=![calc][new]!"
- )
- )
- )
- )
- echo/
- echo,![true]!
- )
- pause
- exit
- :[calc]
- for /f "delims=" %%c in ('mshta.exe "vbscript:createobject("scripting.filesystemobject").getstandardstream(1).write(%[calc]%)(close)"') do set "[calc][new]=%%~c"
- goto:eof
复制代码
|