Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Find all images and export size per folder to csv

$
0
0

Dear,

I'm trying to write a script that displays me the amount of image (video,audio) files users have stored in their homedrives.

It needs to go through the mainfolder let's say x:\homedrives where all userfolders are under. And give me the total size of images per main folder (X:\homedrives\a ; X:\homedrives\b;...). What I have so far is the following:

# PowerShell script to list the multimediafiles files under the home folders

 

 

$files

 

 

=Get-ChildItem-Recurse-Include*jpg,*bmp,*pngX:\homedrives\a

$SumExt= ($files|Measure-Object-SumLength).Sum /1GB

#The results output to a CSV file

$SumExt

 

 

|export-csv"C:\admin\03_scripts\imagesize.csv"-notypeinformation

But this doesn't even give me anything


Viewing all articles
Browse latest Browse all 6937