IF Condition File Name Pattern

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
2 posts Page 1 of 1

dchmax

Posts: 6
Joined: Tue Jun 10, 2014 1:23 pm

Post by dchmax » Thu Aug 18, 2016 3:14 pm
I have an IF statement condition that I'm trying to put together that will look at a file name and determine if it has a specific pattern starting pattern.

ex.
File Name: 483_329_XP_STUFF_STUFF.xml

So I'm looking for - ###_###_??*.xml

This is what I have so far but its not working.

${StartsWith(CurrentItem:name,'###_###_??_')}

Thank you

mgable

Posts: 1
Joined: Sat Aug 31, 2019 11:02 am

Post by mgable » Tue Sep 03, 2019 7:28 am
Try ${IsValidText(text, regex)}

Sample: ${file:name} = Report_Aug-2019.csv

If: ${IsValidText(file:name, 'Report_[a-zA-Z][a-zA-Z][a-zA-Z]-20[0-9][0-9].csv')}
<Matches>
2 posts Page 1 of 1