IF activity condition: If there is only 1 file in folder

I am trying to write a condition to check whether there is only one file in a folder or not.

i tried using Directory.GetFiles(foldersource, “.xlsx”, SearchOption.AllDirectories).Count <> 1 but it wasn’t accurate.

How can I make such a condition?

Hi @dvn,

Pls try this solution.Let me know if you have any issues.



Omkar P

1 Like