14楼的兄台在开玩笑吧。你的叫输出不叫排序哦- @Echo Off&SetLocal EnableDelayedExpansion
- Set /P Var_Filepach=请讲要处理的文件,拖入此框中。
- For /f %%a in (%Var_Filepach%) do (
- Set /a NumValue+=1
- Set "StrLine!NumValue!=%%a"
- )
- For /l %%z in (1,1,%NumValue%) do (
- For /l %%a in (1,1,%NumValue%) do (
- For /f "tokens=* delims=." %%b in ("!StrLine%%a!") do Set StrLineNumValueA=%%b
- Set "Var_Stepvalue=%%a"
- Set /a Var_Stepvalue+=1
- If !Var_Stepvalue! GEQ %NumValue% Set Var_Stepvalue=%NumValue%
- Echo !Var_Stepvalue! > %Temp%\Temp
- For /f %%b in (%Temp%\Temp) do (
- For /f "tokens=* delims=." %%b in ("!StrLine%%b!") do Set StrLineNumValueB=%%b
- If !StrLineNumValueA! GTR !StrLineNumValueB! (
- Set "StrLineT=!StrLine%%a!"
- Set "StrLine%%a=!StrLine%%b!"
- Set "StrLine%%b=!StrLineT!"
- )
- )
- )
- )
- For /l %%a in (1,1,%NumValue%) do (
- Echo !StrLine%%a!
- )
- Pause
复制代码
|