Forum Discussion

Mihir Yelamanchili's avatar
Mihir Yelamanchili
Brass Contributor
Nov 22, 2018

Is there any way that I can get all the folders and files count inside a folder?

Is there a way to get the count of all the files, folders under a particular folder using PowerShell command? 

  • Yes, simply use the -Recurse parameter? For example:

     

    (dir D:\Downloads\ -Recurse).Count
    
    dir . -Recurse | measure
    

Resources