Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Count Images

$
0
0

Summary: Learn how to use Windows PowerShell to count images.

Hey, Scripting Guy! Question How can I use Windows PowerShell to count images on a drive?

Hey, Scripting Guy! Answer Use the Get-ChildItem cmdlet, specify the path, and send the results to the Measure-Object cmdlet,
           for example:

dir -Recurse -ea 0 -File -path e:\data -include "*.gif","*.jpg", "*.png", "*.bmp" | measure

Note  Dir is an alias for Get-ChildItem and Measure is an alias for Measure-Object.


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>