jehrler Posted March 16, 2013 Share Posted March 16, 2013 So if I know the name of a file buried deep in a set of folders, I would like to be able to do a Quick File Search to find the file and then have an action or hotkey combo to display that file in the File Navigation, rather than starting at root with / or in the home folder with ~. I thought there was a way to do that but now I can't remember/figure it out. Link to comment
Andrew Posted March 16, 2013 Share Posted March 16, 2013 Simply use cmd+down on the selected folder in the default results to navigate into that folder Link to comment
jehrler Posted March 16, 2013 Author Share Posted March 16, 2013 Thanks. That helps, but if I am on an actual file, rather than a folder, this doesn't work. Link to comment
jdfwarrior Posted March 17, 2013 Share Posted March 17, 2013 You could use something like this: temp="{query}"; if [ -d $temp ]; then osascript -e "tell application \"Alfred 2\" to search \"$temp\"" else folder=$(dirname "$temp") osascript -e "tell application \"Alfred 2\" to search \"$folder\"" fi Create a file action, name it appropriately, set file type or leave it blank.. make it attach to a Run Script module with this code. If the passed data is a folder, it browses that folder in Alfred (which btw, there is already a "Browse Folder in Alfred" action for folders"), if the passed data is a file, it gets the path to the file and browses that path in Alfred. Is that what you were looking for? Link to comment
jehrler Posted March 17, 2013 Author Share Posted March 17, 2013 Could be, I just thought it would be built in like the folder option Andrew mentioned. Not quite sure why this would only work with folders and not files. Seems somewhat arbitrarily restrictive. Link to comment
jdfwarrior Posted March 17, 2013 Share Posted March 17, 2013 Could be, I just thought it would be built in like the folder option Andrew mentioned. Not quite sure why this would only work with folders and not files. Seems somewhat arbitrarily restrictive. Well, technically you can't browse a file, so, that's why it's only available on folder results. You could use the code provided above and disable the default "Browse Folder in Alfred" action and just use this one instead if you wanted to, then it would be available for both files and folders. Link to comment
jehrler Posted March 17, 2013 Author Share Posted March 17, 2013 (edited) Well, technically, the feature is called Quick File Search not Quick Folder Search . Therefore I would imagine most people are using this to search for files rather than folders, thus lessening the value of cmd+down. I guess I should move this to feature suggestions as it would allow quick navigation to deeply nested folders where you know a file name but not the folder name or where the first result is a file in the desired folder. edit: to correct my technicality to make it technically correct. Edited March 17, 2013 by jehrler Link to comment
jehrler Posted March 17, 2013 Author Share Posted March 17, 2013 BTW, your action workflow works perfectly. Thanks. Link to comment
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