nihaoareyou 当前离线
列兵
DAIC 当前离线
中将
echo %%a %%b >>.\del_dir\%%i复制代码
TOP
mms0536 当前离线
上等兵
@echo off &echo test echo mkdir del_dir for /r "C:\Users\MMS\Desktop\" %%i in (*.txt) do ( for /f "usebackq tokens=2,3 delims= " %%a in ("%%i") do ( call :del_str %%a %%b %%i ) ) echo 已完成 exit :del_str echo %1 %2 >.\del_dir\%~n3.txt goto :eof复制代码
sed -i "s/[^ ]\+ //" *.txt复制代码
@echo off mkdir del_dir for /r "txt所在目录" %%i in (*.txt) do ( for /f "tokens=2,3 delims= " %%a in (%%i) do ( call :del_str %%a %%b %%i ) ) echo 已完成 exit :del_dir echo %1 %2 >.\del_dir\%~n3.txt goto :eof复制代码
for /f "tokens=2,3 delims= " %%a in (xxx.txt) do ( echo %%a %%b >xxx_del.txt )复制代码