Switch case for files

Hello,

What I want :
I have a file : “Extraction_VERS.xlsx” in UiPath\ReFramework\Data\Input folder.
I want for file who contains “VERS” go to the folder “VERS”
I want for file who contains “TERS” go to the folder “TERS”

What I have done:

I use a switch case but it’s don’t work, becase it’s not going in the “VERS” case :frowning:
Instead of, if I use IF CASE CONTAINS.(“VERS”) it’s working :frowning:
Can you help me to fix my problem ?

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(CurrentFile.Name,pattern).Value

Regards,

1 Like

Hello @MasterSinge ,

Instead of using contains in the case, can you try using in the switch statement itself? Like this:

Thanks,
Athira

1 Like

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