keep getting error
“Finder got an error: Handler can’t handle objects of this class.”
it makes the folder but will not copy
set fname to text returned of (display dialog "enter your first name:" default answer "First name")
set lname to text returned of (display dialog "enter your Last name:" default answer "Last Name")
set locname to fname & lname
set localpath to "Macintosh HD:Users:computerservices:" & locname & ":"
tell application "Finder"
make new folder at folder "computerservices" of folder "Users" of startup disk with properties {name:locname}
duplicate folder "Macintosh HD:Users:computerservices:pictures:" to localpath with replacing
end tell
set localpath to “Macintosh HD:Users:computerservices:” & locname & “:”
so you may need to add ‘folder’ before local path to coerce it to a reference. You don’t need to do that though, because you can just get the result of the ‘make’ command:
set localpath to (make new folder at folder “computerservices” of folder “Users” of startup disk with properties {name:locname}) as alias
Coercing to alias is not necessary, but the alias reference has an advantage.