Zend certified PHP/Magento developer

Batch rename MKV files using existing metadata value?

So, I’ve been searching for a solution to this, and I have found how to change the title value within the MKV using mkvpropedit and the existing file name, but I can’t find anything on how to do this the other way around.

My issue is I have a folder with 700+ MKV files from a recovery that have the following filenames: FILE000.MKV, FILE001.MKV, and so on. When opening the files with MediaInfo, the “Movie name” fields contain the correct original file names. I would like to get the info from each file’s metadata “Movie name” and then batch rename the file names with this entry. Clearly, doing this manually will take a long time. How would one go about accomplishing this within terminal on mac?