I'm trying to automate my SABnzbd setup (running on QNAP) using a post-processing script.
As part of this, I would like to move my subtitle files out of the /Subs/* folder to the parent directory, as Plex doesn't support this type of structure.
So far, this is my script:
Code: Select all
#!/bin/bash
cd $1
find . \( -path "*/Subs/*" -o -path "*/subs/*" -o -path "*/SUBS/*" \) -print -exec mv {} ./ \; && find . -type d -empty -delete
echo Done
Code: Select all
/share/Download/SABnzbd Scripts/filebot-shows.sh: line 2: cd: /share/video/Serien/Moon: No such file or directory
Is there anything I could do about this isssue other than using a file path without spaces?