I'm trying to figure out how to rename multiple files (100s) that have different extensions to their respective sub directory name. Here is the structure:
Parentdir |--subdir1 |---name1.txt |---name2.jpeg |--name3.ovc |--subdir2 |--name4.txt |--name5.tiff |-name6.mpeg
what I would like to do is batch process a rename of all files within their respective subdir name while maintaining their extension.
From the parent directory I was using this command but I'm having issues with the file extensions:
for subdir in *; do mv $subdir/* $subdir.mpeg; done;