jgyc123 当前离线
列兵
CrLf 当前离线
论坛巡查
@echo off set /p n=跳过多少行? for %%a in (*.txt) do ( set copy=1 for /f "skip=%n%" %%b in (%%~sa) do ( if defined copy set copy= ) if defined copy copy "%%a" "b\" )复制代码
TOP
awk 当前离线
上尉
@echo off set /p n=请输入行数: for /f "tokens=2,3 delims=: " %%i in ('find /c /v "" *.txt') do ( if %%j lss %n% copy "%%i" "b" ) pause复制代码
terse 当前离线
中将
@echo off&setlocal enabledelayedexpansion set mun=100 for /f "tokens=1,2 delims=:" %%i in ('find /v /c "" *.TXT') do ( if %%j lss %mun% ( set str=%%i >nul 2>nul copy "!str:* =!" "b\" ) ) PAUSE复制代码
FOR 当前离线
中尉
@echo off set n=100 for /f "tokens=2,3 delims=: " %%i in ('find /c /v "" *.txt') do ( if %%j lss %n% copy "%%i" "b" ) pause复制代码
评分人数
sxw (^_^)当前离线
少尉
yyykkkyyyy 当前离线
二级士官
@echo off set da=A set db=B set/a n=100 if not exist "%db%" md "%db%" for /f "delims=" %%a in ('dir/b/a-d %da%\')do ( more +%n% "%da%\%%a"|find/v "">nul||( echo %%a&set/a m+=1 copy "%da%\%%a" "%db%\">nul)) if defined m (echo 已复制 %m% 个文件)else echo 没发现满足条件的文件 pause复制代码