Page 1 of 1

Post processing script stopped working

Posted: November 5th, 2011, 11:59 am
by CloudDweller
I'm hoping that someone can shed a little light on why my post processing script has suddenly stopped working. I'm not sure if its upgrading to Lion, installing the latest version of SABnzbd, moving my media to an external USB drive or a combination of all three but now every time I run this script it fails.

Code: Select all

#!/bin/bash

cp -Rf /Users/Chris/Downloads/Movies/ /Volumes/External HD/Movies &&
rm -Rf /Users/Chris/Downloads/Movies/
This is the error I get:

Exit(64)
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory

I've set my external drive to ignore permissions as I thought that this might be causing the issue but its still not working. I've wondered if maybe its that my USB drive spins down and so needs to spin up before it can copy the data, but I've got no way of disabling the drives power management and I really don't want to so I'm hoping its not that. Anyone got any ideas as I really don't see what the problem is.

Re: Post processing script stopped working

Posted: November 5th, 2011, 1:48 pm
by sander
There's a space in your "External HD" directory, but without quotes. That probably won't work. So, from the command line, try out what works: with double quotes, or with a \ before the space.

HTH

Re: Post processing script stopped working

Posted: November 6th, 2011, 7:53 am
by CloudDweller
That did the trick. I added a "\" after the space and now its working again. Thanks for your help.