Command to move subtitles
Posted: Mon Apr 26, 2021 1:14 am
I want to execute the following command 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, but this did not work. Was hoping someone may have an idea on how to do this.
Code: Select all
find . -mindepth 2 -type f -iname '*.srt' -exec sh -c 'mv -i "$1" "${1%/*/*}"' sh {} \;
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 {} \;