I am trying to duplicate a file from one folder to another on the same computer but am getting an error I cannot seem to figure out. It is occurring on the duplicate line of the script.
I have the error message posted below the part of the script that is getting the error. The script is trying to copy a file from the Profiles folder of the user ‘me’ and copy it to a folder on the Shared user. It seemed like a pretty basic thing to do, but I cannot figure out what is wrong. The error messages reads like it thinks the file is in the Shared user folder?
Any help would be appreciated. Thanks.
if matched = false then
duplicate file profileLocation to folder sharedProfiles
end if
Here is the log with error message:
copy file "M08091993:Users:wrh2:Library:ColorSync:Profiles:blurg" to folder "M08091993:Users:Shared:Color Profiles:Profiles"
--> error number -1728 from file "M08091993:Users:wrh2:Library:ColorSync:Profiles:blurg"
Result:
error “Finder got an error: Can’t set folder "M08091993:Users:Shared:Color Profiles:Profiles" to file "M08091993:Users:me:Library:ColorSync:Profiles:blurg".” number -10006 from folder “M08091993:Users:Shared:Color Profiles:Profiles”
I’ve just been trying it myself. Duplicating from the current user folder to the Shared user folder definitely works. That error occurs if either of the paths is wrong ” that is if either the file or the target folder don’t exist with the specified name or in the specified location.
So I think it is fixed??? I just deleted the line with the duplicate command and retyped it. I compiled and then ran the script and now it seems to be working fine… very odd. Thanks for the help!