I have a directory which contains many directories, I need to know how I can know the name of directories containing more than 12 files.
Either powershell or batch are fine.
cd C:\Parent
Get-ChildItem | Where-Object { @(Get-ChildItem $_).count -gt 12}
Get-ChildItem returns a list of all files and folders in the current folder.
Where-Object allows us to filter that list, to get only the folders that match the criteria. $_ refers to the current object for each iteration.
This should work.
countandfilesbecause I'm certain there are many similar already on this site. - Compo