Getting the path of currently selected file in Finder

Chris, you've made some very nice, very helpful additions to the wiki. :+1:

Many thanks.

Thanks Chris, looks like I need to check out Path Finder keyboard shortcuts.

Very nice and thankx. It’s sometimes so natural to go off programming something or looking for special KM actions that something as simple as this doesn’t present itself.

To get the filename without the path, just add parentheses around the second .*. You’ll see a field for a second capture group – that will be the file name with no path.

Hi, I'm trying to find a method of extracting a valid path from theDroppedItems (coming in from AppleScriptEditor). I tried reading this but have been unable to do it.

I'm hoping to use the path in theDroppedItems (the full folder-path, not the full folder&file-path) and copy it to the clipboard.

There will be only one file. Is this complex to do?

Hey Esa,

I'm not aware of any such thing, so I suspect a language issue. :wink:

Could you rephrase and be more specific?

-Chris

Perhaps the context is this page: ?

https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/ProcessDroppedFilesandFolders.html

Hey Rob,

I considered that, but Esa said:

That doesn't imply a droplet, so let's get a definitive answer from him before moving on.

-Chris

and an example would be good :slight_smile:

Just wanted to say this old thread helped me a lot during "Ronaland."

1 Like