Jump to content
OliverJAsh

Workflow idea: Quickly navigate to recent folders

Recommended Posts

I would really like to see a workflow that acts like this z binary does in the terminal: https://github.com/rupa/z

 

It keeps track of folders you have recently viewed, and then you can easily navigate to a recent folder just by typing part of the name. For example, if I recently viewed “~/Documents/Personal Documents/” then I could just type “z personal” into terminal and it would navigate me to that folder.

 

I'm imagining something similar with Alfred. If I recently viewed “~/Documents/Personal Documents/” in Finder, then I could pop open Alfred and type "z personal" (or "recent personal") and it would open a Finder window to “~/Documents/Personal Documents/”.

 

I would quite like to work on this idea with somebody, if this is even possible, and if anyone is interested or has an idea of how you would track/log recent folders in Finder… (an AppleScript constantly running in the background, perhaps?

Share this post


Link to post

Better yet, give you a drop down result of recent folders from within Alfred that you can then easily open in Finder but view recents and then narrow to the folder you need. Sounds like a great idea but hard to implement. I wouldn't know but it sure does sound challenging…  Results in Alfred of recently navigated Finder folders would be a killer feature, but only if a certain amount of recently viewed folders are available from Alfred's results to choose to then quickly to choose from.

Share this post


Link to post

Something similar is already in Alfred (v1) but not in the v2 beta yet. In v1 if you type Finder (or narrow it down to just the letter F) then tab and select 'Recent Documents' it shows the folders you've accessed recently.

 

Hopefully it will make it back into Alfred 2.

 
 

Share this post


Link to post

Something similar is already in Alfred (v1) but not in the v2 beta yet. In v1 if you type Finder (or narrow it down to just the letter F) then tab and select 'Recent Documents' it shows the folders you've accessed recently.

 

Hopefully it will make it back into Alfred 2.

 
 

I remember trying that before on v1 and I didn't get any results… maybe one old folder I hadn't accessed in a long time but that's probably because of TotalFinder or some other application I have messing with Alfred. Good to know that it did work fine in v1. I think these few missing features will slowly find their way back or different solutions will be implemented. I have faith, Alfred's future is bright.

Share this post


Link to post

I remember trying that before on v1 and I didn't get any results… maybe one old folder I hadn't accessed in a long time but that's probably because of TotalFinder or some other application I have messing with Alfred. Good to know that it did work fine in v1. I think these few missing features will slowly find their way back or different solutions will be implemented. I have faith, Alfred's future is bright.

 

Yea, a few things are missing at the moment that are in v1. Hopefully they'll be added in the future.

 

 

 

Sounded like an interesting idea, so I figured I'd give it a go.

 

Screen%20Shot%202013-01-16%20at%208.11.5

It uses the same list as the Go -> Recent Folders menu in Finder. I haven't thoroughly tested it yet, so let me know if you have any problems (or any other feeback).

 

Download: http://cl.ly/0C3q0s3A2E0x

 

Very nice, thanks.

 

Share this post


Link to post
Sounded like an interesting idea, so I figured I'd give it a go.

 

Screen%20Shot%202013-01-16%20at%208.11.5

It uses the same list as the Go -> Recent Folders menu in Finder. I haven't thoroughly tested it yet, so let me know if you have any problems (or any other feeback).

 

Download: http://cl.ly/0C3q0s3A2E0x

 

I agree with Jono, very nice indeed! Thanks for sharing this with us, especially those of us like me who are allergic to code.

Share this post


Link to post

Well done sir. I like it.

 

Also, just as a note, instead of the applescript, this could have been done with the Open File action, or a script. The Open File requires no code, just drag the Finder icon into the box to tell it to open with Finder

Share this post


Link to post

Ah, thanks, good to know.

 

I spent most of my time trying to figure how to read the recent folders from Finder's plist (after lots of googling, I still had no idea what I was doing  ;)), so I sorta rushed through the workflow bits.

 

Oh, and sorry for anyone looking at the applescript, as it's a bit of a mess. I'm working on cleaning it up and documenting it better, for anyone who's curious how it works.

 

Edit: I've updated the workflow to clean up the applescript a bit, for anyone interested. I've updated the download URL in my original post, but I'll post it again for convenience: http://cl.ly/0V1G2x0B0I3Y

Share this post


Link to post
Thanks! Just remembered reading about file icons in your post on generating feedback, so I've updated my workflow to use the proper icons. Link: http://cl.ly/0V1G2x0B0I3Y

 

Updated my original screenshot to reflect this.

 

Great update, thanks!

 

Share this post


Link to post

I updated this to support the new type="file" attribute in b100. This means Alfred will treat the results like files, so you can use the right arrow to action them, or add them to your file buffer.

 

I'm not sure about the keyword ("recent"), as it's been used by a couple of other workflows. Would "folders" or "finder" work better?

 

Download: http://cl.ly/1x3J0s0L0z0h

Share this post


Link to post
I'm not sure about the keyword ("recent"), as it's been used by a couple of other workflows. Would "folders" or "finder" work better?

Thanks for a great flow

 

Personally I'd stick with "recent" as it seems very applicable and matches Apple's own terminology for this capability.

Share this post


Link to post
Thanks for a great flow

 

Personally I'd stick with "recent" as it seems very applicable and matches Apple's own terminology for this capability.

 

Following the OSX way is always nice and easier for new users.

Share this post


Link to post

Thanks for this :)

 

Is there any way to automatically leave out "untitled folder" from the results?

 

When I type "recent", I see the results from new folders I made, before I renamed them (and they no longer exist of course).

Share this post


Link to post

Thanks for this :)

 

Is there any way to automatically leave out "untitled folder" from the results?

 

When I type "recent", I see the results from new folders I made, before I renamed them (and they no longer exist of course).

 

Thanks for letting me know about that. Looks like Finder was storing the wrong path in its plist (with "untitled folder" at the end), yet it's still showing the updated folder name in the title.

 

Updated the workflow so it'll try to show the correct folder instead. It also checks to see if each folder exists, so it won't show any folders you recently deleted. (Download -- AlfPT appears to be down right now, so the update isn't available there yet)

Share this post


Link to post

@Clinton Strong Nice workflow !

 

I can't make it work anymore. Here is the log :

Starting debug for 'Recent Folders'

[ERROR: alfred.workflow.input.scriptfilter] Code 1: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- alfred (LoadError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from get_recent_folders.rb:1:in `<main>'

Tested the workflow this morning with Alfred 2 v2.4 (279) Mac OS X 10.9.4 (13E28).

 

Version of the workflow tested: I downloaded the workflow from the link in your last post. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...