Post processing script stopped working

Come up with a useful post-processing script? Share it here!
Post Reply
CloudDweller
Newbie
Newbie
Posts: 19
Joined: October 27th, 2010, 12:31 pm

Post processing script stopped working

Post 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.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Post processing script stopped working

Post 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
CloudDweller
Newbie
Newbie
Posts: 19
Joined: October 27th, 2010, 12:31 pm

Re: Post processing script stopped working

Post by CloudDweller »

That did the trick. I added a "\" after the space and now its working again. Thanks for your help.
Post Reply