Hy, on my leap 15.0 the problem is:
I have many files that have .avi extension but they are matroska files and should have .mkv extension, I never noted this becouse using smplayer it seems that extension is not important, it opens and play flawlessly any file, when I transfere these files in other apparatuses it doesn't works, the matroska files files must have the .mkv extension.
I would have a script that change the extension of all matroska files in a folder with .avi extension to .mkv extension.
I reached this script that works but on all the avi files:
Code:
#!/bin/bash#here under /where/the/files/are
cd /home/procuste/Downloads/prove/
find . -name '*.avi' \
-exec mmv {} {}.mkv \;
I found that using mediainfo I can get if the file is matroska in this way:
Code:
mediainfo "name-of-the-file" | grep "Matroska"
I tried to add this option to the working script but I didn't succeed, the less error version is this:
Code:
#!/bin/bash#here under /where/the/files/are
cd /home/procuste/Downloads/prove/
find . -name '*.avi' | 'mediainfo | grep "Matroska"' \
-exec mmv {} {}.mkv \;
could some saint guy gives me a suggestion to solve this problem correcting this script or in another way??
manythanks, ciao :-)