Check If folder is empty

How can I determine if a specific folder is empty or not, and based on that information, decide on the appropriate next steps to take

use this expression it will return True if folder is not empty will return False if the folder is empty"path to folder").any() 
1 Like



Hi @Gaurav_Gore

You can use the below expression in If condition,

- Condition -> System.IO.Path.GetFile("Folder path").Select(Function(x) x).Count<1

The bot will execute then block if no files found in the folder.
The bot will execute else block a single file found in folder.

Hope it helps!!

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