发布网友 发布时间:2024-08-28 16:56
共1个回答
热心网友 时间:2024-08-28 21:08
@Echo Off&Setlocal Enabledelayedexpansion
For /f "tokens=*" %%i in ('dir /a-d /b /s "%~dp0*.csv"') do (
Set n=&Set n1=&Set "ff=%%~dpi"&Set "ff=!ff:~,-1!"
If not Exist "!ff!-target" Md "!ff!-target"
For /f "skip=1 usebackq delims=" %%j in ("%%i") do (Set /a n+=1)
For /f "skip=1 usebackq delims=" %%k in ("%%i") do (Set /a n1+=1
If !n1! lss !n! (Echo %%k>>"!ff!-target\%%~nxi")))
Pause
把批处理和A,B,C,D目录放在一起