Bash script to rename subtitles

It’ll loop through all the children from where you stand, look for the .srt file and rename it to it’s parent folder-name and then copy it to the parent folder.

for folder in */; do
  cd "$folder"
  for file in *.srt; do
    mv "$file" "${folder%/}.srt"
    cp "${folder%/}.srt" ../../
  done
  cd ..
done