- @echo off
- setlocal ENABLEDELAYEDEXPANSION
- md l100
- md g100
- for /l %%i in (0,1,9) do set "n%%i=%%i"
- for /f "delims=" %%a in (1.txt) do (
- for %%b in (%%a) do (
- if %%b lss 100 (echo off >l100/%%b) else (echo off >g100/%%b)
- )
- )
- dir /o:n /b l100 >>result.txt
- dir /o:n /b g100 >>result.txt
- for /f %%m in (result.txt) do (
- set num=%%m
- set re=n!num:~-1!
- call set "!re!=%%!re!%% %%m"
- )
- for /l %%p in (0,1,9) do call echo %%n%%p%%
- rd /s /q l100
- rd /s /q g100
- del result.txt
- pause
- goto :eof
复制代码 昨天没看到有排序的要求 HOHO 现在写好了 新手 给点鼓励 |