I've got a script to change the title of the mkv to that of the file name but it's adding the extension as well. Does anyone know how I can make it ignore the extension
This is what I'm using at the moment
Code:for %%x in (*.mkv) do mkvpropedit "%%x" --edit info --set "title=%%x" pause
+ Reply to Thread
Results 1 to 8 of 8
-
-
I think this will work:
Code:for %%x in (*.mkv) do mkvpropedit "%%x" --edit info --set "title=%%~nx" pause
-
That's spot on thanks
do you know how I can make it work by putting it in folder and have it go through all the folders and do all the mkvs? I've never liked trying to do loops with bat files -
Here's batch file I have that converts all m4a files in all folders/subfolders (from where the batch file is located). You should be able to adapt it for your purposes:
Code:dir/b/s *.m4a >m4alist.txt for /F "delims=;" %%F in (m4alist.txt) do "g:\program files\ffmpeg\bin\ffmpeg.exe" -i "%%F" -f wav -ac 2 "%%~dF%%~pF%%~nF.wav" del m4alist.txt
-
I went ahead and did it...
Code:dir/b/s *.mkv >list.txt for /F "delims=;" %%F in (list.txt) do "G:\Program Files\mkvtoolnix\mkvpropedit" "%%F" --edit info --set "title=%%~nF" del list.txt
-
Yes that was slick and here's the simple way to do the loop all the way through, much easier than creating a list file with delimiters.
for /R <DIR> %%x in (*.mkv) do mkvpropedit "%%x" --edit info --set "title=%%~nx"
pause
That will auto loop through the <DIR> tree, obviously if you are doing it interactive you only need 1 % in each place and no pause:
for /R <DIR> %x in (*.mkv) do mkvpropedit "%x" --edit info --set "title=%~nx" -
I'm wondering if I should post mine. It's a bit big and sets all the track names too, plus it requires a silly little program I wrote that taps into the mediainfo dll. I tend to set TV episodes numbering as - SSxEE - but it shouldn't be hard to modify the batch. The problem with setting the Segment Title to the file name is that there are a few characters the file system doesn't allow so of course they're removed from the name. As a final step I generally run a powershell script that finds all the relevant info in the MediaCenterMaster data files and happily sets the Segment title with the full character set (and sets some basic tags as well, at least the ones I think are safe).
Similar Threads
-
Avidemux title change
By Pitorasilo in forum Newbie / General discussionsReplies: 6Last Post: 5th Aug 2013, 00:55 -
Need to change DVD title
By sjmaye in forum DVD RippingReplies: 1Last Post: 26th Jan 2013, 04:41 -
mkvpropedit what command prevent 'header removal compression'
By MikeF1 in forum Video ConversionReplies: 0Last Post: 6th Jan 2011, 16:05 -
How to CHange the visible title of a subtitle file
By shukero in forum SubtitleReplies: 3Last Post: 29th Mar 2009, 19:02 -
is there a choise? change title in automkv
By caner12 in forum Video ConversionReplies: 1Last Post: 9th Feb 2009, 03:23