Используя команду call "имя файла"
Код:
Код: Выделить всё
@echo off
chcp 1251>nul
set number=20
set "root=bface."
set "source=F:\01 start"
set "destination=F:\MOVER\01 start"
set "reg_exp=^[0-9][0-9][0-9][0-9]%root%\...*"
for /f "delims=" %%i in ('
dir /a-d/b/o-n "%source%\*%root%*"^| findstr /irc:"%reg_exp%"
') do (
set /a count+=1
for /f %%j in ('
set /a count
') do (
if %%j leq %number% (
move "%source%\%%i" "%destination%">nul
) else (
exit /b
)
)
)