I was trying to think of the cleanest way to do this, but I'm not sure what the best way is, or even how to go about it.
Essentially I just want to see if various phrases are in my filename, and if it is then to set a variable one way, and if they're absent, then to set it another. In a sort of pseudo-code:
Code: Select all
if %InputFilename% contains "*example*" OR "*another*version*" OR "*this*and*that*" (
set Condition=1
) else (
set Condition=2
)
There may be upwards of 20+ of these conditional phrases. Is there a way to do this using some type of OR in the if statement? Or should it just be a giant chain of ELSE IF questions?
Also, is there a way to search for "*word1*word3*" with wildcards before, after, and in the middle, so that "word1word2word3.txt" would be found?
Any help would be appreciated. Thanks!