Jump to content

Why having two filters in this workflow breaks it


Recommended Posts

I would like to modify this workflow. There is a file filter swikifold that searches for folders inside a folder I specified. In my case there is one `knowledge` root folder that can be seen here and many other folders inside it.

 

There is a modifier action alt here:

 

5a6e7715de09b_2018-01-29at02_21.png.2cf8627cf8cb9f3b3b90a39ea92f5b29.png

 

 

That will do either of two things. It will create a folder at the root of my knowledge folder or if the passed in path is not my root folder, it will create the folder in the designated path. It also asks me what name I want to give to the folder. 

 

The problem is with these two filters here:

5a6e77a1b7309_2018-01-29at02_23.png.37de9f9cfcd7e78804a5e87feaaba556.png

 

The workflow can't do the filtering it seems. When I call my workflow, the workflow dismisses. I am not sure why. Nor do I know how I can rewrite it to fix this so it works for both these cases. If there is only one filter there, everything works.

 

I attached my workflow above. Would love to get any help on this. Thank you. 

 

Edited by nikivi
Link to comment

I can't run the workflow, as it's specific to your system and its directories, but your regex before the filters is messed up and is probably an issue.


(\/Users\/nikivi\/src\/github\/nikitavoloboev\/personal\/knowledge\/) is broken. There's no need for the brackets, as you're not trying to capture any submatches, and the backslashes are plain wrong: you only need to escape slashes when they're the "this is a regex" delimiter, like in JavaScript or vim. That isn't the case here.


In fact, there doesn't appear to be any need for a regex at all. A simple string match would be much better.

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