名字存在 sub_name.txt 文件中。- @echo off>nul 3>sub_name.txt
- setlocal enableDelayedExpansion
- set name=pengyou86
- :lp
- set/a nl+=1
- if not "!name:~%nl%!"=="" goto :lp
- set/a ml=nl-1
- call :showN name %ml%
- echo 名字%name%长度为%nl%,共有%num%个子地址。
- goto :eof
- :showN
- for /l %%a in (1 1 %2) do (
- if not "!%1:~%%a,1!"=="." (
- echo !%1:~,%%a!.!%1:~%%a!@gmail.com&set/anum+=1
- set %11=!%1:~,%%a!.!%1:~%%a!
- call :showN %11 %%a
- )
- )
复制代码
|