Applescript Error: "Finder got an error: "Can't get disk.............

We recently upgraded our XserveG5 to Leopard Server from Panther Server. This script worked like a charm until the upgrade. Here’s the syntax.

tell application “Finder”
activate
set TimeIsNow to current date
set MNTH to month of TimeIsNow as string
set DT to day of TimeIsNow
set YEEr to year of TimeIsNow as string
set TYr to item 3 of YEEr
set Yr to item 4 of YEEr
end tell

if MNTH is “January” then
set Mo to “01”
else
if MNTH is “February” then set Mo to “02”
if MNTH is “March” then set Mo to “03”
if MNTH is “April” then set Mo to “04”
if MNTH is “May” then set Mo to “05”
if MNTH is “June” then set Mo to “06”
if MNTH is “July” then set Mo to “07”
if MNTH is “August” then set Mo to “08”
if MNTH is “September” then set Mo to “09”
if MNTH is “October” then set Mo to “10”
if MNTH is “November” then set Mo to “11”
if MNTH is “December” then set Mo to “12”
end if
tell application “Finder”
set theDate to Mo & “" & DT & "” & TYr & Yr as string
end tell

tell application “Finder”
activate
duplicate items in disk “/ServerBoot:Library:Filemaker Server:Data:Backups” to {make new folder at disk “/Volumes/g5backups” with properties {name:theDate & “_9AM”}}
end tell

Why do I get the error? AM I missing something. I tried changing “Finder” to “System Events”. I’m lost. Any help will be met with much appreciation!!!

Thanks!

Todd

I can not test on a xserve
But it seems there a number of incorrect syntax.

You paths need to be in HFS form (ServerBoot:Library:Filemaker Server:Data:Backup) and not Posix. (“/Volumes/g5backups”)
And also not mixed. /ServerBoot:Library:Filemaker Server:Data:Backups

You do not need Disk, just make the paths into Aliases.
use the " ( ) " brackets to execute code inside separately rather than the “{ }”

The “{ }” are for list or properties

Try this on the end.

tell application "Finder"
	activate
	set serv to "ServerBoot:Library:Filemaker Server:Data:Backups" as alias
	set g5backupsto "g5backups:" as alias
	duplicate items in serv to (make new folder at (ig5backups) with properties {name:theDate & "_9AM"})
end tell

Mark:

I bow to thee! :wink:

Your welcome,:slight_smile: