I wanted to get a list of different file extensions in a project I was looking at so I knew the makeup of the code and technology. Pretty cool little command.
gci -recurse | select -expand extension | group | sort count -Descending
Which returned the following.
Count Name Group
----- ---- -----
667 .asp {.asp, .asp, .asp, .asp...}
530 .gif {.gif, .gif, .gif, .gif...}
345 {, , , ...}
264 .js {.js, .js, .js, .js...}
47 .txt {.txt, .txt, .txt, .txt...}
46 .htm {.htm, .htm, .htm, .htm...}
45 .ai {.ai, .ai, .ai, .ai...}
42 .css {.css, .css, .css, .css...}
31 .pdf {.pdf, .pdf, .pdf, .pdf...}
21 .doc {.doc, .doc, .doc, .doc...}
16 .xml {.xml, .xml, .xml, .xml...}
16 .xsl {.xsl, .xsl, .xsl, .xsl...}
15 .jpg {.jpg, .jpg, .jpg, .jpg...}
14 .png {.png, .png, .png, .png...}
11 .html {.html, .html, .html, .html...}
9 .psd {.psd, .psd, .psd, .psd...}
8 .wsml {.wsml, .wsml, .wsml, .wsml...}
5 .bak {.bak, .bak, .bak, .bak...}
4 .WSDL {.WSDL, .WSDL, .WSDL, .WSDL}
3 .bat {.bat, .bat, .bat}
3 .WGen {.WGen, .WGen, .WGen}
2 .harbinger {.harbinger, .harbinger}
2 .aspWORKING {.aspWORKING, .aspWORKING}
2 .concord {.concord, .concord}
1 .aspUPLOAD {.aspUPLOAD}
1 .ini {.ini}
1 .mdb {.mdb}
1 .tmp {.tmp}
1 .LOG {.LOG}
1 .asa {.asa}
1 .xls {.xls}
1 .xml~ {.xml~}