VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. 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
    Quote Quote  
  2. I think this will work:

    Code:
    for %%x in (*.mkv) do mkvpropedit "%%x" --edit info --set "title=%%~nx"
    pause
    Quote Quote  
  3. 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
    Quote Quote  
  4. 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
    It uses dir/b/s to build a list of all the files, walks through that list, then deletes the list.
    Quote Quote  
  5. 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
    Quote Quote  
  6. Originally Posted by jagabo View Post
    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


    Brilliant. That's spot on. Thanks
    Quote Quote  



Similar Threads