I have one or many files and/or folders selected in the Finder. I manually copy them to the clipboard/pasteboard (⌘C).
To keep things simple, let's say I just copied one single normal file. The ideal solution, however, would deal with many files and a mixed selection with folders, aliases.
Now that this file is on the clipboard, I want to get its full path (preferably the POSIX path).
To save you time:
- I'm looking for an AppleScript (or rb-appscript) solution.
- I don't want to get the path directly from the selection. It must be from the item on the clipboard.
- Really, I know I can route around this by copying the path(s) to the selection first, then doing whatever I'm up to with it.
What I know so far (noted in rb-appscript):
OSAX.osax.the_clipboard
has a string of file names without path.Appscript.app('Finder').clipboard.get
is apparently not implemented (dictionary says "NOT AVAILABLE YET"; calling it returns:missing_value
.