cancel
Showing results for 
Search instead for 
Did you mean: 

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

philerck
Confirmed Champ
Confirmed Champ

 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 5

mehe
Elite Collaborator
Elite Collaborator

„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
Confirmed Champ
Confirmed Champ

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
Elite Collaborator
Elite Collaborator

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
Confirmed Champ
Confirmed Champ

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
Elite Collaborator
Elite Collaborator

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)