Is it possible to set a OR Condition in a rule for a Folder?

cancel
Showing results for 
Search instead for 
Did you mean: 
philerck
Active Member

Is it possible to set a OR Condition in a rule for a Folder?

 The rule should trigger if the Name of the file starts with test OR test2 and if so move file to another folder.

5 Replies
mehe
Senior Member II

Re: Is it possible to set a OR Condition in a rule for a Folder?

„Begins with test OR test2“ is the same as „begins with test“

So you won‘t need any OR condition

if you  need a more complex condition, you could use „Execute script“ and put your condition in the javascript code.

philerck
Active Member

Re: Is it possible to set a OR Condition in a rule for a Folder?

Hi Martin, thanks for an answer and help.

Test and Test2 was a bad example :-).  Made a script and it is working like it should.

Thanks, Phil

mehe
Senior Member II

Re: Is it possible to set a OR Condition in a rule for a Folder?

Another ugly way would be to duplicate the script but use different trigger „begins with“.

This is not only ugly but also error prone as we can see using your (now it’s a good example Smiley Happy ) example. Both scripts would be triggered.

philerck
Active Member

Re: Is it possible to set a OR Condition in a rule for a Folder?

My Script use a array within the possible "begins with" and it checks in a for loop the filename against the array with a regex. If its true then move the file to another folder. Is this ugly too? Or is there a better solution?

mehe
Senior Member II

Re: Is it possible to set a OR Condition in a rule for a Folder?

I‘m shure there are a lot of good solutions we both are not thinking of - but yours sounds like it‘s ok and using an array for the regexes make it easy to understand (better than building a single regexp with a lot of OR conditions)