本帖最后由 /zhqsystem/zhq 于 2023-11-25 23:04 编辑
- rem 特别说明:#号不能连续,又发现一处错误#也不能在开始字段,凑合用吧,来回减字符数字实在是烧脑
- if /i "%~f1"=="" echo,错误请拖拽运行或是调用[+路径]运行&timeout.exe /t 10&exit
- >"%~f1.tmp" (
- for /f "delims=" %%i in ('type "%~f1"')do (
- set "#=%%i"
- call:1
- call:2 "%~f1"
- )
- )
- goto:eof
- :1
- for /l %%n in (0,1,8192)do if /i "!#:~%%n,1!"=="" set/a "$_All=%%n"&&goto:eof
- goto:eof
- :2
- set "n=0"
- for /l %%n in (0,1,!$_All!)do if /i "!#:~%%n,1!"=="#" set/a "n+=1"&&set "$_!n!=%%n"
- set/a "o=!n!%%2"
- if /i "!o!"=="0" (call:3)else (echo,!#!)&&rem 符号不成组直接导出
- goto:eof
- :3
- set "#_tmp=!#!"
- set/a "nn=!n!+2"&&rem 修正段
- for /l %%n in (1,1,!nn!)do if defined #_tmp for /f "tokens=1,2,* delims=#" %%x in ("!#_tmp!")do (
- if /i not "%%y"=="" set "#_tmp=%%x%%z"
- )
- echo,!#_tmp!
- goto:eof
复制代码
|