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

3 Likes