Jump to content

Dynamic Filesearch: I would like name contains, not name starts with


Recommended Posts

I duplicated  @Vero 's excellent Dynamic Filesearch to create my own folder and file extension specific searches.

If I type the keyword followed a space followed by the filename, the workflow expects me to remember the filename starting with the first word of the filename.

For example, if I have a file called

 

covid map texas aug 2020

 

the workflow expects me to type covid. I can't just type texas or map which makes the workflow useless because there is no way that I remember exact filenames ie the sequence of words. All file search engines work on the premise of name contains searchword, not name starts with searchword

 

Is there something that I don't understand ? 

 

thank you !

 

 

Link to comment

thank you @Vero for replying to my post.

that's precisely the point. I don't know which one to choose

Could you point me to a workflow which does the following

  • searches in a specific folder like ~/Documents/Scrivener
  • assigns a keyword, ie the search is prompted if I type scr (scr + space)
  • search for a specific kind of file, for example .scriv
  • will recognize any word in the filename, ie I do not have to start with the correct word (otherwise it's useless for me)
  • will open the file when I click Enter (or any keypress you prefer) 
  • ideally I would also like to have the option to
    • filter files by name, for example all files containing the name troubleshooting. By this I mean that a workflow by design will only select files containing the word tax for example.
    • also to exclude those files which contain certain words in the name. My point is that when I work on complicated files, I do frequent backups which have the same filename except that I add BAK date-time to the name. I would like to exclude all files containing BAK in the filename

 

Please understand: if I can see the workflow, I think that I will be able to understand how to edit it, and I can always ask you, but I am very frustrated in my efforts to achieve the above, which should be quite basic.

I would also like to see some of your more advanced file searches just so I can dissect them and better understand your son Alfred.

I don't understand how some file searches can expect the user to remember the exact sequence of words in the title.

 

merci maman Vero !

Link to comment
10 hours ago, rob213 said:

that's precisely the point. I don't know which one to choose

 

Forget about that for now. Upload your own workflow that isn't working somewhere (Dropbox?) and post a link to it, so we can have a look and tell you what's wrong.

 

A File Filter does recognise any word in the filename by default, so your workflow is simply misconfigured.

Link to comment

 Thank you @deanishe for your reply.

The following is precisely what I do not understand.

This is @Vero 's template workflow.

1- Would you be so kind as to explain the first 3 steps of the workflow ? I know that the steps are explained but I don't understand the logic. Example: do I enter the same information (folder and file types) in both file filters ? the same keyword ?

2- as I explained in my post above, can I exclude certain files ? I want to exclude all fines containing the word backup

3- can I make the results box bigger so I don't have to scroll down ?

I am completely confused.

Thank you very much !

 

image.thumb.png.ad941b41b122ef98ab820009a5b8ceee.png

Edited by rob213
Link to comment
3 hours ago, rob213 said:

Example: do I enter the same information (folder and file types) in both file filters ? the same keyword ?

 

No. The first File Filter is to select the folder you want to search in. The second is to perform the actual search in that folder. (The JSON Config in between configures the second File Filter to search in the folder you selected in the first File Filter.) So the first File Filter must be configured to only search for folders and the second to only search for the types of files you want to search the folder for.

 

There shouldn't be a keyword on the second File Filter because it won't work if you run it directly: you must first choose a folder to search in.

 

3 hours ago, rob213 said:

2- as I explained in my post above, can I exclude certain files ? I want to exclude all fines containing the word backup

3- can I make the results box bigger so I don't have to scroll down ?

 

No and no. The system metadata index—and by extension Alfred—doesn't support excluding certain results (beyond the global blacklist in System Preferences > Spotlight).

Link to comment
5 hours ago, rob213 said:

would it be possible to give me the link to a reference explaining the fields tab ?

 

https://developer.apple.com/library/archive/documentation/CoreServices/Reference/MetadataAttributesRef/Reference/CommonAttrs.html#//apple_ref/doc/uid/TP40001694-SW1

 

5 hours ago, rob213 said:

I notice for example that you can specify kind but there is no option to indicate which kind (pdf, .pages, etc)

 

Well no. It doesn’t make much sense to put anything other than {query} in there. If you want to specify certain filetypes to search, you do that under the Basic Setup tab.

 

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