PowerTip: Use PowerShell to Count Photos

PowerTip: Use PowerShell to Count Photos

  • Comments 2
  • Likes

Summary: Learn to use Windows PowerShell to count the number of photographs you have on your computer.

Hey, Scripting Guy! Question How can I use Windows PowerShell to count all the photographs I have on a specific drive?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet to find all of the photos, and then pipe the results to the 
          Measure-Object cmdlet. The following command counts the number of .jpg and .crc files on drive E:

Get-ChildItem -Recurse -Include *.jpg, *.cr2 -Path e:\ | Measure-Object

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Love this blog