jaacob Posted October 24, 2013 Posted October 24, 2013 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.
Tyler Eich Posted October 24, 2013 Posted October 24, 2013 (edited) 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 October 24, 2013 by Tyler Eich
jaacob Posted October 27, 2013 Author Posted October 27, 2013 Worked perfectly. Thanks for the confirmation I'm not crazy for thinking this should be built in to Alfred. Will make that feature suggestion! Tyler Eich 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now