In the folder any text file exist or not how to check using uipath

I want to check that into a folder there is text file available or not

[Password] 【LDAP】Date.txt
[Password] 【LDAP】Name.txt

like that file, I already tried PathExists activity

in the path field, I tried [Password] 【LDAP】.txt
[Password] 【LDAP】

but generate result always False

Hi,

Can you try the following sentence?

fileExists = System.IO.Directory.GetFiles(yourFolder,"[Password] 【LDAP】*.txt").Any

Regards,

1 Like

where this statement use
in assign activity or other

Hi,

Please use in assign activity.
Note: yourFolder is string type variable, fileExists is boolean type variable.

Regards,

and its work
really Thank you

1 Like

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