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@192.168.1.13/System”
tell application “Finder”
activate
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”
activate
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.
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.
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/backupscript.app”
I’m not 100% sure about the quotes, but that’s how CronniX entered it in when I used the “Insert Program…” menu option.