autochanger script: rip & rename
Posted: Wed Jan 12, 2011 6:31 pm
been looking for a suitable script for my sony xl1b autochanger running mediadogg's mediachanger gui on a 2003 server box - can't believe it was so hard to find the stupid commands to rename the mkv files.
mediachanger passes the dvd drive letter as param 4 (%4), or you can just assign a drive letter (I used M)
I'm ripping to title##.mkv in d:\temp, then renaming to "yymmdd_hhmmss {dvd_label} title##".mkv
hope this helps someone else
---------------------------------------
@echo off
"C:\Program Files\MakeMKV\makemkvcon.exe" --minlength 1260 mkv disc:0 all d:\temp
d:
cd \temp
vol m: > tmpFile
set /p label= < tmpFile
del tmpFile
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set newname=%date:~12,2%%date:~4,2%%date:~7,2% %hh%%time:~3,2%%time:~6,2% %label:~22,99%
for %%i in (title*.mkv) do ren "%%i" "%newname% %%i"
---------------------------------------
This is the most important part of the workflow, & the part that took me the most time to figure out.
The rest was pretty easy. I scan the upc's via my android phone using clipbot as I load the changer, so the resulting date/time stamps match the same order as my upc list - I email the upc list to my mac & translate into good disk titles via Delicious Library v1.7, then build a simple script to rename the date/time stamped files to their real movie title names.
mediachanger passes the dvd drive letter as param 4 (%4), or you can just assign a drive letter (I used M)
I'm ripping to title##.mkv in d:\temp, then renaming to "yymmdd_hhmmss {dvd_label} title##".mkv
hope this helps someone else
---------------------------------------
@echo off
"C:\Program Files\MakeMKV\makemkvcon.exe" --minlength 1260 mkv disc:0 all d:\temp
d:
cd \temp
vol m: > tmpFile
set /p label= < tmpFile
del tmpFile
set hh=%time:~0,2%
if "%time:~0,1%"==" " set hh=0%hh:~1,1%
set newname=%date:~12,2%%date:~4,2%%date:~7,2% %hh%%time:~3,2%%time:~6,2% %label:~22,99%
for %%i in (title*.mkv) do ren "%%i" "%newname% %%i"
---------------------------------------
This is the most important part of the workflow, & the part that took me the most time to figure out.
The rest was pretty easy. I scan the upc's via my android phone using clipbot as I load the changer, so the resulting date/time stamps match the same order as my upc list - I email the upc list to my mac & translate into good disk titles via Delicious Library v1.7, then build a simple script to rename the date/time stamped files to their real movie title names.