Using -exec mkvpropedit

Any questions? Need some help?
Post Reply
ByteShare
Posts: 27
Joined: 13 Mar 2018, 15:38

Using -exec mkvpropedit

Post by ByteShare »

From: viewtopic.php?f=4&t=5047
Newer versions of FileBot support the -exec option for the -rename and -mediainfo commands:

Code: Select all

-exec mkvpropedit {f} --edit info --set title={object}
Is this for command line only? Or is there a way to get something like this to execute before a file is renamed in via a present?
Hoping to keep original filename in the MKV Media Info.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using -exec mkvpropedit

Post by rednoah »

The -exec feature is only supported on the command-line. I recommend processing files in the GUI, and then updating mkvprops in a second step via a command-line script.

e.g. you can use the filebot -mediainfo to generate and execute command-line calls like so:

Code: Select all

$ filebot -mediainfo -r . -exec echo "{original} => {fn}"
Execute [echo, Firefly.1x01 => Firefly - 1x01 - The Train Job]
Firefly.1x01 => Firefly - 1x01 - The Train Job
:idea: Note that FileBot already keeps the original name in xattr, which is why the script above works after processing files with the FileBot GUI.
:idea: Please read the FAQ and How to Request Help.
ByteShare
Posts: 27
Joined: 13 Mar 2018, 15:38

Re: Using -exec mkvpropedit

Post by ByteShare »

Thank you for clearing that up.
I was already running a batch file:

Code: Select all

@echo off
for %%a in (*.mkv) do "C:\Program Files\MKVToolNix\mkvpropedit.exe" "%output%%%~na%%~xa" --edit info --set "title=%%a"
I use this step before renaming as a backup method in case something goes wrong in renaming, or if I care to know information for the future, which in both cases doesn't come up offten so I leave that info inside of the MKV.
I know FileBot keeps a log and can revert files, which has been a huge help, but less helpful if days and weeks or more go by and I've moved files around.
Post Reply