I have a number of directories, corresponding to series names, and random filename underneath each, as follows:
Title.S01E01/1234abc.mkv Title.S01E02/5678def.mkv Title.S01E03/10101qpr.mkv ....etc
Each directory is either empty or contains at most one file.
I need to rename files underneath each directory with the directory name, keeping the extension.
I tried the usual find/rename combination, but I couldn't exactly figure out the regex necessary to extract the directory name from the list of found files, and to appropriately pass it to the rename commend.