If activity error

I’m using this if activity statement to get the filenames. it works to get all the files but error after end of file ( not able to meet else statement). any issue with this ?emphasized text
sqrDescCurrIndex>=1 And not string.IsNullOrEmpty(descSplit(sqrDescCurrIndex))



You might want to evaluate the second member of your clause to understand.

From what I guess from your screenshot, I’ll get the file names like below:

Assign (String)
pattern = "\ba_.+?\.sqr\b"

Assign (MatchCollection)
fileNames = System.Text.RegularExpressions.Regex.Matches(yourText, pattern)

Then iterate over fileNames with a ForEach (item type = Match) and work with item.Value.ToString