思想之翼 当前在线
上尉
评分人数
batman 当前离线
考官
荣誉版主
TOP
@echo off for %%a in (*.txt) do ( setlocal enabledelayedexpansion for /f "usebackq delims=" %%b in ("%%a") do set /a n+=1&set "_!n!=%%b" (for /l %%b in (!n!,-1,1) do echo,!_%%b!)>$ move $ "%%a" endlocal )复制代码
foxJL 当前离线
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (a.txt) do (set /a n+=1 & set str_!n!=%%i) for /l %%j in (!n!,-1,1) do (echo,!str_%%j!>>b.txt) pause复制代码
terse 当前离线
中将
sort /+1024 a.txt> "(降序)a.txt"复制代码
@echo off&setlocal enabledelayedexpansion for %%a in (*.txt) do ( set "n=" for /f "usebackq delims=" %%i in ("%%a") do (set /a n+=1 & set str_!n!=%%i) for /l %%j in (!n!,-1,1) do (echo,!str_%%j!>>%%~na_b.txt) ) pause复制代码