Command to move subtitles

If you run qBittorrent in / with Docker.
Post Reply
DrSeussFreak
Newbie
Newbie
Posts: 1
Joined: Mon Apr 26, 2021 1:09 am

Command to move subtitles

Post by DrSeussFreak »

I want to execute the following command

Code: Select all

find . -mindepth 2 -type f -iname '*.srt' -exec sh -c 'mv -i "$1" "${1%/*/*}"' sh {} \;
once a download finishes, so the subtitles stores in the "/downloads/movies/Subs/" directory are moved to the "/downloads/movies/" directory for import by radarr.

I know where I need to place the line of code, but I am not sure how to configure it to be ran in the recently downloaded files directory. I tried

Code: Select all

find %R -mindepth 2 -type f -iname '*.srt' -exec sh -c 'mv -i "$1" "${1%/*/*}"' sh {} \;
, but this did not work. Was hoping someone may have an idea on how to do this.
Post Reply