Cfol Class Error Has Thrown Me !

This script was written to copy a shared folder that is mounted on my desktop -

If I try it with a local folder it works perfectly, however when I it with the mounted folder I get this “Cfol Class Error”

I think it is to do with the path and aliases ? Any help would be appreciated.

tell application “Finder”
set the_date to current date
set the_year to year of the_date
set the_month to month of the_date
set the_day to day of the_date
set folder_name to “” & the_month & “-” & the_day & “-” & the_year
set destFolder to make new folder at “My Disk” with properties {name:folder_name}
duplicate folder “My folder” of desktop to destFolder
end tell

Thanks

Ian.

Yes indeed. You’re trying to make the new folder at “My Disk” (which is a string) instead of at ‘disk “My Disk”’ (which is a Finder reference to a disk).

set destFolder to make new folder at disk "My Disk" with properties {name:folder_name}

… assuming, of course, that “My Disk” is the name of a disk. :wink: