Jump to content

File Filter questions


Recommended Posts

Hi, 

 

I'm trying to set up a file filter that uses kMDItemContentModificationDate and kMDItemDateAdded and, in my testing, I haven't been able to search via those fields. I used the alfred metadata tool to specifically test the exact dates stored the metadata fields to no success. Has anyone been able to do this? Am I missing something? 

 

Also, is there a way with the file filter to search all files (like a wildcard *)?

 

I am trying to set up a filter to quickly look for all recent files. I tried a few workflows, but they take multiple seconds to process, and I'd love to just snag my last edited file really swiftly. 

 

Any help is appreciated!

Link to post
2 hours ago, thisisb said:

Am I missing something? 

 

I don't think so. AFAIK, Alfred can't handle time/date fields. The underlying index engine supports queries like kMDItemContentModificationDate > $time.yesterday, but I don't think Alfred does.

 

1 hour ago, thisisb said:

Also, is there a way with the file filter to search all files (like a wildcard *)?

 

Without a query? No.

 

1 hour ago, thisisb said:

I tried a few workflows, but they take multiple seconds to process

 

Did you try this one? It's not super fast, but it's basically using the same metadata index as Alfred and Spotlight, so the overhead isn't huge. You'd need to set up a Smart Folder/Saved Search for recently-modified files first.

Link to post

Thanks so much. Really helpful info. I actually have tried that workflow, and I needed to see within the smartfolder without having to open it in finder. This one seems to just show file actions when I tab into the folder and need to open in finder to see the details.

 

I've been using https://www.alfredforum.com/topic/1715-find-files-recently-changed-similar-to-trickster-functionality/ which essentially uses a some terminal commands (/usr/bin/mdfind -onlyin ~/ '(kMDItemDateAdded >= \$time.now(-600000) || kMDItemContentModificationDate >= \$time.now(-600000))) to grab the most recent files. It does what I need, only sometimes takes a few seconds to update the list and can break flow. Not sure if the hangup is in running the results through the included workflow.php, or if it's elsewhere? 

 

Thanks again for your help!

Link to post
5 hours ago, thisisb said:

This one seems to just show file actions when I tab into the folder and need to open in finder to see the details.

 

That’s because you have Alfred configured to show File Actions when you hit TAB.

 

5 hours ago, thisisb said:

only sometimes takes a few seconds to update the list and can break flow.

 

That can’t really be helped: it’s a slow query. The overhead of the workflow is minimal.

 

The main difference to Alfred and Finder is that they can use “live” results, i.e. they can start showing results before the search has finished and updated them as more results come it. Workflows necessarily have to wait till the search finishes before they can show the results.

Link to post

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...