Share this page 

Quickly get how many files in a directory (Windows)Tag(s): Misc Prog HowTo


Windows Explorer doesn't perform very well with a folder containing several thousands of files, especially on a network.

A quick way to get the number of files is to open a DOS Shell and type :

dir /b /a-d foldername |  find /c /v ""
To count files in subdirectories, just add the "/s" switch.
J:\>dir /b /s /a-d BACKUP|  find /c /v ""
42553