Navigate to an Original File From Its Alias

I have a large number of aliases in a folder, and I want to create a macro that will navigate in the Finder to the original file corresponding with any given alias. Ideally I would select the file and press a hotkey that would take me to the original file.

Anyone?

Many thanks.

I'm not sure I understand you correctly, but this should work.

You don't need the alias though. Just enter the path to the original, choose a hot key and KM will show you the file in the Finder.

Ah, sorry, you don't need KM for that. You can do that with ⌘+r in the Finder :slightly_smiling_face:

3 Likes

Hi @Polyvox. I see that @Frankb answered your original question: Finder's File>Show Original or ⌘+R.

Since you mentioned aliases, I thought I'd mention a macro that I'm working on that includes two other alias functions:

  1. Select a file or folder (or several at once), create an alias for each, and move the new aliases to a favorite folder.

  2. Select an alias file (or several at once) and replace it/them with a copy(ies) of original file(s) and/or folder(s).

The first function is fairly straightforward, but the second is more nuanced. These screenshots might help.

For more information, see: Want to Help Test a Finder-related Macro?

It's not R on Mojave – it's A

It used to be the former prior to Mojave. I don't know what it is after Mojave...

If you need to get the original item of an alias for further processing then it's simple enough with AppleScript:

# Working with a selected alias in the Finder.

tell application "Finder"
   
   set finderSelectionList to selection as alias list
   if length of finderSelectionList = 0 then error "No files were selected in the Finder!"
   set theItem to item 1 of finderSelectionList
   
   set theOriginalItem to original item of theItem
   
end tell
# Working with the path to an Alias _File_.

set aliasFilePath to "~/Desktop/To Be Filed!"

tell application "System Events" to set aliasFilePath to POSIX path of (disk item aliasFilePath)

tell application "Finder"
   set theOriginalItem to original item of file (aliasFilePath as «class furl») as alias
end tell

### Note that there is a difference between an AppleScript alias and an Alias File.

There are also a couple of command line tools available if that method is preferred:

While Keyboard Maestro can resolve symlinks with a filter, I don't believe it can resolve alias files.

There is a precompiled binary available for this one:

I don't believe there is a precompiled binary available for this one, but it's not too difficult to make if you have Xcode installed.

1 Like

Good point, @ccstone. I don't remember when it changed to R but it definitely is with Ventura. Of course one could create a simple KM macro to select the menu File>Show Original which should work regardless.

Oh, good!

I thought the change was absolutely stupid and unnecessary – throwing aways decades of user's muscle-memory.

Nice when Apple actually recognizes they made a mistake and fixes it...

And also with Monterey :slightly_smiling_face:

And use the shortcut you want. :slightly_smiling_face:

1 Like