Find out whether a file exists or not with System.IO.Directory.GetFiles

Hallo Everyone
I have a condition like this, so what if I want to use an if condition to find out whether the data exists or not?

@samarasenja

If you want to check if atleast one file exists then use directory.getfiles("folderpath").Count>0

If you want to check for a specific file then directly you can use file exists activity

Hope this helps

Cheers

HI,

FYI, another way:

Files.Any

Regards,

1 Like

This is Solved thanks

1 Like

Hi, this is solved too

Thanks

1 Like

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