Код:
@echo off
:: Обрабатываемая папка
set "directory=D:\Camera"
:: Папка назначения
set "out=D:\_Backup_"
pushd "%directory%"
for /f "delims=" %%i in ('2^>nul dir /a-d/b *.avi') do (
set file=%%i
call set "folder=%%file:~-24,4%%\%%file:~-31,6%%\%%file:~-20,2%%\%%file:~-18,2%%"
2>nul call md "%out%\%%folder%%"
>nul call move "%%i" "%out%\%%folder%%"
)
popd
exit /b