Basic Backup Script.

I just want to copy my Retrospect catalog files from my Xserve to an OS9 G4.

Here’s what I have so far…

open location “afp://administrator:password@”

tell application “Finder”
if exists folder “Retrospect” of folder “RetroCatalogs” of disk “System” then
select folder “Retrospect” of folder “RetroCatalogs” of disk “System”
delete selection
end if
end tell

with timeout of 1000 seconds
tell application “Finder”
duplicate folder “Retrospect” of folder “Preferences” of folder “Library” of disk “OS X SERVER” to folder “RetroCatalogs” of disk “System”
end tell
end timeout

Every time I get an error saying an item of the same name already exixts even though the retrospect folder at the destination has been deleted.

Am I going about this in the wrong way?

Many Thanks


It may be that Retrospect creates a new folder as soon as the other is deleted. You could use this line:

duplicate folder "Retrospect" of folder "Preferences" of folder "Library" of disk "OS X SERVER" to folder "RetroCatalogs" of disk "System" with replacing

With the “with replacing” you wouldn’t need the lines deleting the folder.


Thanks very much thats exactly what I needed, works perfectly everytime.


One last thing though, Is is possible to run this using crontab?

I’ve entered the folowing in my crontab file :

0 16 * * * root open /library/scripts/

So this should run everyday at 4pm right? However it doesn’t run at all.

Not sure about the open bit.Is that the right command to use in crontab?

Hi babaton,

I am working on an Applescript backup solution myself, and am very new to a lot of this stuff. However, I am using the CronniX program (a front-end GUI for setting up crontabs), and according to the CronniX manual, the prefix “/usr/bin/open” is required to run applications from the command line.

So, your entry would now be:
/usr/bin/open “/library/scripts/”

I’m not 100% sure about the quotes, but that’s how CronniX entered it in when I used the “Insert Program…” menu option.

I don’t know where “root” would come in.



Try (for a compiled script): /usr/bin/osascript /Users/Me/Library/Scripts/myScript.scpt. Works like a dream