Jump to content

How can I delete a file from a file filter?


Recommended Posts

Should be easy but I am still quite confused.

 

I have a file filter that searches for files and I want to attach an action for a modifier keypress. 

 

Here is the workflow download : https://transfer.sh/BP4mq/search-files.alfredworkflow  

 

It has a bunch of other file filter searches but one I want to change is 'mindnode' search. This one : 

 

Qbt3tmd.png 

 

I tried to first try to move the file to Desktop by doing something like this : 

 

w95qePX.png 

 

But that does nothing. I did check and I do get a path passed in from the file filter. Although the path is of this form : 

 

'/Users/nikivi/Library/Mobile Documents/W6L39UYL6Z~com~mindnode~MindNode/Documents/..'

 

I was also thinking of using this cli https://github.com/sindresorhus/trash as I have it installed on my system. I don't really know why it is not working though.

 

Thank you for any help.

Edited by nikivi
Link to comment
49 minutes ago, nikivi said:

I haven't sorry.

 

Why not? I'd really like to understand why you start asking on the forum before you even look in the debugger.

 

I mean, it takes 5 seconds. Posting takes minutes. Getting a reply hours.

 

49 minutes ago, nikivi said:

Not sure why 'mv' wasn't working

 

Because the path had a space in it and you aren't quoting the arguments. If you'd looked at the error in the debugger ("/Users/nikivi/Library/Mobile: No such file or directory"), you might have figured that out. You must understand quoting arguments in bash by now.

Link to comment

I actually haven't thought that debugger would output anything for this thus I didn't even think of checking it. :(

 

On the bright side, if there is again someone like me who has such issue, he actually has something to search for in the forum. 

Edited by nikivi
Link to comment
4 hours ago, nikivi said:

I actually haven't thought that debugger would output anything for this thus I didn't even think of checking it.

 

To comment on this point, even the absence of information can be a clue. As a recent example, see this post and the reply. Notice how the absence of the (seemingly irrelevant and uninformative) [action.script] Processing output of 'action.script' with arg '' line was what gave me the clue to the underlying issue that something was stuck.

 

It is especially when you don’t have a clue where the problem lies that you need to look everywhere for any message. If you don’t understand where the problem is, you also don’t know where to look to fix it. Anything can be the missing piece. Throw an echo in there, or even a say. When the computer isn’t doing something you want, make it instead read your instructions back to you. More often than not it is the developer who was unclear.


RTFM” is typically a diss, but it’s also a healthy attitude to have towards yourself. I remember hearing that when sitting down to meditate, the more experienced meditators are the ones who take longer. It is because they are more experienced that they know they should take extra time to ensure they are comfortably seated. Similarly, it is by paying attention to what the system tells you that you become a better programmer. The less you understand the error, the less you can dismiss any message.

Edited by vitor
Link to comment

RTFM is definitely a diss. It usually means, "I gave you this software for free, and I spent a lot of time documenting it. So spend a few minutes of your time reading it before you start wasting my time with questions I've already answered." (Which may or may not be justified, depending on the quality of the docs.)

 

I have all the time in the world for people who try, but don't know enough to solve a problem. Heck, I largely wrote Alfred-Workflow for @smarg19  Always had time for him because he wanted to learn, not have things done for him. (He's probably a better coder than me by now.)

 

But people who don't even try to solve a problem for themselves, who don't spend a few minutes of their own time trying to figure out a problem before they go "spending" other people's, well … that literally says, "I have zero respect for your time."

 

And, imo, you also publicly make yourself look like a lazy fool, asking questions that are clearly answered in the docs, another issue, the error message, or a post on the same page as yours, simply because you were too damn lazy to read them.

 

Personally, I'm always extremely embarrassed when that's me.

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