How to copy from one user's desktop to another?

I have a script that copies files and works for me UNLESS I am copying to another user’s desktop…and then it fails

duplicate item subSourceFile to subDestinationFolder with replacing

How do I do so without getting an error?

Hi,

you haven’t sufficient access privileges to move files to another user’s homefolder.
You could use the shell cp command in conjunction with administrator privileges, which provides root privileges to you

Yes, previously I accomplished this in a bash script, but I was hoping to move it over to an Applescript solution.

So, is there no way to do this using only Applescript?

Are there any add-ins for Applescript that would allow me to do this?

The code that I am working on updates system and user files for hospital systems.

Thanks to everyone!

Michael

you can call shell commands from applescript

do shell script "/bin/cp -Rp '/path/to/source' '/path/to/destination'" user name "name" password "pass" with administrator privileges

is the equivalent to sudo cp. in the shell