How to check if the folder is empty or not?

Hi @kararora,

strdirPath="D:\Arivu\FolderName"

in If condition check the folder is empty or not.
If(Directory.GetFiles(strdirPath).Length == 0 && Directory.GetDirectories(strdirPath).Length == 0)

True->Folder is empty

Regards,
Arivu

5 Likes