hazardhz, до кучи вариант №2:
Код:
![Выделить весь код](images/misc/selectcode.png)
@Echo Off
If "%~1"=="" Echo Error. Source folder is not specified.&Exit /B 1
If "%~2"=="" Echo Error. Output folder is not specified.&Exit /B 1
For /F "Tokens=*" %%A In ('Dir /B /S /A-D "%~1"^|FindStr /R .*\\[^^^^\\]*[0-9][^^^^\\]*[0-9][^^^^\\]*[0-9][^^^^\\]*[0-9][^^^^\\]*[.].*') Do (
Echo %%A
Call :_Func "%%A" "%~1" "%~2"
)
GoTo :EOF
:_Func
Set Source=%~dp1
Call MD "%%Source:%~2\=%~3\%%" 2>nul
Call Move /Y %1 "%%Source:%~2=%~3\%%" >nul