Count files in a Folder

How to count the files in a folder?

Hi @prititit,

Try this below aticle it might help you:

Thanks,
Neelima.

Use Directory.GetFiles(“path”).Count and assign it to an integer.

You cna also use Directory.GetDirectories("…").Count to count the number of folders in a directory

1 Like