Page 1 of 1

Check if Folder is empty

Posted: Fri Feb 24, 2017 7:59 am
by aziaaddini
Hi,
Im sorry if this question was asked before, but i couldn't find anything regarding this. I need to check if a folder is empty? is there a way to do this.
I know Using Find all files will return the files, but that would slow down if there are many files in that location. All I need to do to see if there is a way to check if folder is empty or not?
Can you please advise.

Thanks you

Re: Check if Folder is empty

Posted: Fri Feb 24, 2017 1:08 pm
by FrancescoT
Dear Aziaaddini,

the only option is to use the "Find All Files" command along with the "Search Subfolders" and "Include Directory Names" parameters.

If the folder is EMPTY, the command will return an empty string.

Otherwise, you should use a custom DLL/Exe for that.

Hope this helps you.

Regards