How Can I Copy a File to the Clipboard?

@kcwhat @tiffle

I found the solution but editing the AppleScript in the macro suggested by @kcwhat
It works perfectly
thank you again

tell application "Keyboard Maestro Engine"
set filePathToCopy to "/Users/ronald/card health insurance exp 31 march 2022.pdf"
end tell
set the clipboard to POSIX file filePathToCopy

This post was revised to make the AppleScript easier to read using @ccstone's excellent macro

thank you @ccstone !

3 Likes