Renaming files according to the folder they're in
Save this as a batch file in the root of your tree:
@echo off
for /r /d %%x in (*) do (
pushd "%%x"
echo %%x
for /F "delims=" %%i in ("%%x") do (
ren *.mkv "%%~ni.mkv" 2> NUL
ren *.avi "%%~ni.avi" 2> NUL
ren *.mp4 "%%~ni.mp4" 2> NUL
)
popd
)
Disclaimer: I bear no responsibility for any damage caused.
Though I've tested it on the list you gave, I highly recommend that you back up the files before running the batch file.