How to remove "Thumbs" file from my output

Hi,

I want only the numbers after hyphen and i got it using regex. Later i’m converting the output to integer value. But there are “Thumbs” file in the folders and due to which the bot is stopping at conversion of integer. Could someone help me as how can i skip this “Thumbs” file. Below is the output and error screenshots.

image

Hey!

Take one if condition pass the expression Like this

isNumeric(Variable)

In else block you keep the continue

Then block You can use regex one

Reference:

Regards,
NaNi

Hi

use IF condition and check if the file name contains Thumbs skip the file

hope this is helpful

A defensive check with tryparse can be used before parsing
grafik

hi, i did this but still giving me same error
image

i also tried to check with length of output characters, still i’m getting same error.

Another option as you are already using Regex is to use the Success property from the match object. With the right regex pattern you would be able to determine if conversion can be done or not

Hey!

Try this:

FileName.Equals("Thumbs")

Or

You can do the mentioned approach

Regards,
NaNi

This worked, thanks a lot.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.