So I've got the following:

set mypath to /Users/myuser/Desktop/file.pdf

I want to copy the file of this path to my clipboard. How to I do this? I tried:

set the clipboard to the file mypath

This does not work. Any idea? I just want to be able to copy this file to any application using the clipboard.


1 Answer 1


There are several clipboards, so even if your file managed to fit in the clipboard, all applications is so broad that it's certain many or most will not grab the file contents as you expect/intend and instead grab a name of the file or pe haps the path.

The receiving application decides what to pull off the clipboard and not the script that places something in the clipboard.

You'll likely need to write specific scripts for specific apps and potentially re-evaluate AppleScrips since it might not be the correct tool for this job.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .