Jump to content

How to list files when using file filter or any other alternatives?


Recommended Posts

Hello, I am wanting to browse files in a specific folder and select a file in Alfred. Then I want to do something using a python script.

 

However, the only way I can put the selected file to my script is to use file filter; But when using file filter, I cannot see the list of files in the folder, since it will only list files that match the searching text. That is stupid for Alfred. Why don't it list all the files before the filter works?

 

Please, help me. I was driven mad.

Link to comment
19 hours ago, BerryTaylor said:

the only way I can put the selected file to my script is to use file filter


Why? It sounds like what you want is a File Action Trigger.

 

19 hours ago, BerryTaylor said:

But when using file filter, I cannot see the list of files in the folder, since it will only list files that match the searching text.


Navigate into it. You can enter that from a regular file search, or File Filter, or a multitude of other ways. The default shortcut is ⌘↓.

 

19 hours ago, BerryTaylor said:

That is stupid for Alfred. Why don't it list all the files before the filter works?


I get that you’re frustrated, but venting is counter-productive. It makes your report hard to follow. I don’t even understand what you mean with that second sentence.

 

It seems like you’re simply using the wrong tool for the job, or misusing/misunderstanding the right tool. Either way, if the above didn’t cover it, what we need from you is a clear thorough description of what you want.

Edited by vitor
Link to comment

Sorry for my former description guys, now I will give a  clear thorough description for my workflow.

 

In a high level,

Step 1: I want to select a "folder" in some specific folder. Yes, a "folder" in "specific folder", which means that I need to change the search scope in some specific folder, and select one folder in it.

 

Problem1: Alfred cannot select folder to do some action by file filter. It will just enter the folder and wait for me to select some "file" instead of "folder". I cannot make the folder to be the input for my next script.

 

Step 2: I want to create a symbolic link of my selected folder, and then paste the link to my assigned location, for example, ~/link_collection/.

 

Problem2: I can do this by python if I know the folder paths. However, as I stated in Problem1, I just cannot select the folder, no matter pass its paths to be the input of my python script.

 

Hope you can help me with these problems. It really ruined my day.

 

 

Link to comment
On 1/7/2022 at 1:37 AM, giovanni said:

you could use the 'Dynamic File Search" in the examples to choose the folder first, then the file.

Space or * will list the files in the folder. 

Yes, but it cannot deal with the problem 1. It just waits for me to select a file instead of a "folder".

Link to comment
20 hours ago, vitor said:


Why? It sounds like what you want is a File Action Trigger.

 


Navigate into it. You can enter that from a regular file search, or File Filter, or a multitude of other ways. The default shortcut is ⌘↓.

 


I get that you’re frustrated, but venting is counter-productive. It makes your report hard to follow. I don’t even understand what you mean with that second sentence.

 

It seems like you’re simply using the wrong tool for the job, or misusing/misunderstanding the right tool. Either way, if the above didn’t cover it, what we need from you is a clear thorough description of what you want.

Very sorry for my vague description.

 

First,  File Action Trigger deals with file instead of "folder". 

 

Second, it cannot pass the paths to be the input of my next script.

Link to comment
3 hours ago, BerryTaylor said:

First,  File Action Trigger deals with file instead of folder


No, File Action Triggers deal with paths. Commonly those are files, but folders work just the same.

 

3 hours ago, BerryTaylor said:

Second, it cannot pass the paths to be the input of my next script.


Do that in the Python part.

 

If you need more specific help, you’ll need to upload and post your Workflow.

Link to comment
13 hours ago, vitor said:


No, File Action Triggers deal with paths. Commonly those are files, but folders work just the same.

 


Do that in the Python part.

 

If you need more specific help, you’ll need to upload and post your Workflow.

Tnanks. I have managed to create an alternative, using file filter.

 

Another question: can we set the search depth of file filter? Just like the "find" command in Linux, we can set mindepth, or maxdepth. 

Link to comment
On 1/6/2022 at 5:41 PM, BerryTaylor said:

That is stupid for Alfred. Why don't it list all the files before the filter works?

 

Why doesn't it try to list all the files on your system? Have you ever tried to do that?

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