Find Files in folder without knowing file name


I’m facing a problem in finding files in the Folder means, I don’t know whether in the Folder is their file or not . If there is any file in Folder then Message shows that the File exists or if the file does not present it show the file does not exist.


1 Like


Try as below


This will list you the count of files

Hope this willhelp you



Hope the below expression would help you resolve this

Use a IF activity like this

Directory.GetFiles(“yourfolderpath”).Count > 0

If it is greater than 0 then it goes to THEN part where use a message box with message as “File exists”

Or it goes to ELSE part where use a message box as “File doesn’t exists”

Cheers @mnk

@Palaniyappan Thanks for solution.

1 Like

Happy automation @mnk

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