Summary: Use Windows PowerShell to count different types of image files.
How can I use Windows PowerShell to see a count of the different types of image files on my computer?
Use the Get-ChildItem cmdlet to find the image files and then pipe the results to the Group-Object cmdlet,
for example:
dir -Recurse -ea 0 -File -path e:\data -include "*.gif","*.jpg", "*.png", "*.bmp" |
group extension -NoElement
Note Dir is an alias for Get-ChildItem and Group is an alias for Group-Object.
0 comments