count files by extension using powershell

by Sitaram Pamarthi on June 26, 2010

Just a tip. This will help you to list files count by extension.

Get-Childitem c:\local -Recurse | where { -not $_.PSIsContainer } | group Extension -NoElement | sort count -desc

This post was written by...

– who has written 502 posts on

Sitaram Pamarthi is a windows administrators with 9+ years of more

{ 4 comments… read them below or add one }

Maria March 13, 2012 at 8:18 am

Awesome – saved my life


hamid April 25, 2012 at 10:14 am

that’s grate
I need this code


Rob Andren March 6, 2013 at 11:01 am

Brilliant. Glad I didn’t spend any time reinventing the wheel. Exactly what I needed. Thank you.


lync August 8, 2014 at 8:10 pm

Thank you – saved my day !!!!


Leave a Comment

Previous post:

Next post: