Jump to content

Use alfred to observe contents of "All my Files"


Recommended Posts

"All My Files" is basically a "Recent Items" list.

Pre-El Capitan, there was a plist file at "~/Library/Preferences/com.apple.recentitems.plist" containing the data you're after.

In El Capitan, you can get the list of paths with the shell command:

mdfind -onlyin $HOME '((kMDItemContentModificationDate > $time.now(-60m)) && (kMDItemContentModificationDate < $time.now()))' | grep -v /Library/

(This excludes files in "~/Library".)
 
Alternatively, you can create a Saved Search/Smart Folder called, say, "Recent Items", and plug that into your own workflow with "mdfind -s 'Recent Items'" or my Smart Folders workflow.

Link to comment
  • 2 weeks later...
  • 7 months later...

@deanishe That command ins't exactly the same as what was in the recentitems plist ....it returns recently modified as opposed to recently opened files.

 

but 

mdfind -onlyin $HOME '((kMDItemLastUsedDate > $time.now(-360m)) && (kMDItemLastUsedDate < $time.now()))' | grep -v /Library/ 

does the trick (I changed the time from 60 min to 360 min).

Edited by dfay
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...