Jump to content

Keyword opens specific file or with modifier, shows it in Finder?


Recommended Posts

I have a file I expect to need access to multiple random times over the next few weeks.

 

I'm trying to create a workflow where I type a keyword, and when I hit return, the file opens in its default application. If I hit ⌘-return, it opens a Finder window with the file selected.

 

I can't seem to hardcode a specific file in Alfred; there's no way to feed Alfred a specific file similar to the "Launch Apps/Files" action.

 

It seems unnecessary to have to drop to Applescript for this, but I'm not seeing another way. Am I wrong? Thanks for the help.

 

sidenote: I realize open filename will work 99% of the time, with the ⌘ modifier for Show in Finder - the filename is a common word in my filesystem and I figured I'd make the temp workflow just to not deal with the "is this the right file" decision/slowdown. At this point, I'm just kinda baffled that Alfred doesn't seem to support being fed a specific file ahead of time to act upon without scripting.

Link to comment

I have a file I expect to need access to multiple random times over the next few weeks.

 

I'm trying to create a workflow where I type a keyword, and when I hit return, the file opens in its default application. If I hit ⌘-return, it opens a Finder window with the file selected.

 

I can't seem to hardcode a specific file in Alfred; there's no way to feed Alfred a specific file similar to the "Launch Apps/Files" action.

 

It seems unnecessary to have to drop to Applescript for this, but I'm not seeing another way. Am I wrong? Thanks for the help.

 

sidenote: I realize open filename will work 99% of the time, with the ⌘ modifier for Show in Finder - the filename is a common word in my filesystem and I figured I'd make the temp workflow just to not deal with the "is this the right file" decision/slowdown. At this point, I'm just kinda baffled that Alfred doesn't seem to support being fed a specific file ahead of time to act upon without scripting.

 

Create two 'Run Script' blocks. In one, put:

open /path/to/file

This will open the file, plain and simple

 

In the other, put:

open -R /path/to/file

The '-R' flag will reveal the file in Finder.

 

Then, connect everything as you like. If you'd like more help, say the word.

 

FWIW, I am also surprised that this functionality is lacking in Alfred. This should be possible without any code, but it isn't.

 

I would submit a feature suggestion  ;)

Edited by Tyler Eich
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...