Wildcards in If statement

Discuss RoboTask here
Post Reply
Dylan022
Posts: 13
Joined: Mon Mar 06, 2023 10:53 pm

Wildcards in If statement

Post 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 41 times
Oleg
Site Admin
Posts: 3283
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Wildcards in If statement

Post 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
Oleg Yershov
Post Reply