Page 1 of 1

Wildcards in If statement

Posted: Tue Jan 27, 2026 8:25 pm
by Dylan022
Hey,

Just a quick one, does robotask not support a wildcard in the if statement when it's looking in string to match something? I made a task to put certain files in specific folders based on filename, but the files would never move with "*" in the name. Once I replaced the "*" with a variable for the file date it worked. I included a screenshot of the if statement with the filedate variable, before it had an asterisk there.
Screenshot 2026-01-27 132159.png
Screenshot 2026-01-27 132159.png (20.3 KiB) Viewed 43 times

Re: Wildcards in If statement

Posted: Wed Jan 28, 2026 8:51 am
by Oleg
The "If..Then" action does not use wildcard characters as file mask characters. "*" is just an asterisk, and "?" is just a question mark.
The "If..Then" action compares (in your case) just strings, not file names.
If you need a more complex check, you can use regular expressions. For example RegExp Match action