0

i have a few folders here having thousands of sub folders. each of those sub folders have a .mp4 and a .jpg. i have A, B, C folders.

D:\A\sub folderq\
D:\A\sub folderr\
D:\A\sub folderw\
...
D:\B\sub folderq\
D:\B\sub folderr\
D:\B\sub folderw\
...
D:\C\sub folderq\
D:\C\sub folderr\
D:\C\sub folderw\
...

Each of my main (A, B, C) folders go only one sub folder deep. Each sub folder may have a .srt and .mp3 but a .mp4 and .jpg will definitely be there. I used a batch renamer application to rename the .jpg's to cover.jpg. Then i am now using mkvtoolnix to create a .mkv one by one.

What i want is a batch script / powershell script / anything to automatically create .mkv and move those .mkv's to some folder like A, B or C. Also those .mkv's should take the name of the respective .mp4's from which they are being created. A linux script will also do in case windows script is not possible.

These sub folders / .mp4's / .srt's / .mp3's / .jpg's might also have unicode character in filenames. Thanks in advance.

Edit: okay so i tried this

"C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language en --output ^"D:\A\DVD_003113_0.mkv^" --language 0:und --language 1:und ^"^(^" ^"D:\A\DVD_003113_0.mp4^" ^"^)^" --attachment-name cover.jpg --attachment-mime-type image/png --attach-file ^"D:\A\cover.jpg^" --track-order 0:0,0:1

but it will not run through subfolders. how do i make it run through subfolders.

  • What have you already tried? – slhck Mar 23 '18 at 12:46
  • I haven't tried anything because i don't know how to code. I also didn't find anything for what i want to do. – sameer Mar 23 '18 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.