I wish to batch the creation of mp4 from Prores mov from a nested dir up to a mp4 dir
here is my dir structure
My "start point is Directory of D:\ark
inside there exist D:\ark\prores
which contains many dir like so
D:\ark\prores\ape
D:\ark\prores\cow
and each of those has many many file.mov like so
--- ape
D:\ark\prores\ape\ape_1.mov
D:\ark\prores\ape\ape_2.mov
--- cow
D:\ark\prores\cow\cow_1.mov
D:\ark\prores\cow\cow_2.mov
my goal is to make a mp4 dir like so
D:\ark\mp4 ::: this I am successful at hooRay
then based on each dir ( ape , cow ) found in prores
make a dir in ark next to prores like so
D:\ark\mp4\ape
D:\ark\mp4\cow
then populate those with my mp4 like so
D:\ark\mp4\ape\ ...many mp4 ape_1.mp4 , ape-2.mp4
D:\ark\mp4\cow\ ...many mp4 cow-1.mp4 , cow_2.mp4
it is my 2nd for loop , my nested for which is not working
any assistance would be appreciated
it is very possible that a totally diffrent approach would be wiser this is my 5th version
thankS!
Code: Select all
@echo off
REM 3.2019 js ::: ark 1
Setlocal EnableDelayedExpansion
REM ----------------------------------0\
rem drag in ark , makes a mp4 next to prores , cd into prores
rem for each dir in prores (ape) makes a dir in mp4 (ape) cd into prores/ape
rem makes mp4 in mp4/ape
rem ----------------------------------0/
echo * ------5----------------------------------------------------------------------*
echo *** You will be asked to drag here: ***
echo *** ***
echo ** just drag your dir to this shell , have focus in the shell and hit enter ***
echo ark
rem voice ark
rem set logfile=make-hash.txt
set /p srcDir=Drag your Source Directory here:%=%
@echo %scrcDir%
REM pause
cd /D %srcDir%
dir
REM pause
rem make the mp4 dir under ark
mkdir mp4
cd %srcDir%\prores
REM voice WORKING
REM for /d %%X in (%srcDir%\prores\*) do echo %%X
rem for /D "delims=" %%i in ('dir %srcDir%\prores\*') do (
rem echo %%i
REM --------------make the dir
FOR /D %%G in ("*") DO (
Echo We found %%~nxG
mkdir %srcDir%\mp4\%%~nxG
echo my goal in dir is %srcDir%\prores\%%~nxG
REM *** so far so good what is not happening is after this
rem cd %srcDir%\prores\%%~nxG
echo The current directory is %CD%
REM -----------make file
for /f %%a IN ('%srcDir%\prores\%%~nxG\*.mov') do (
echo found file %%a
ffmpeg -i %srcDir%\prores\%%~nxG\%%a.mov %srcDir%\mp4\%%~nxG\%%a.mp4
rem end for 2
)
rem end for 1
)
I am successful in making the mp4 dir and making the ape , cow dir but I am not currently creating the mp4 files Inside those dir