Posted by: Preetam | March 20, 2008

PS FK:\> Get-ChildItem | Group-Object extension | Sort-Object count

PS FK:\> Get-ChildItem | Group-Object extension | Sort-Object count

Count Name                      Group
—– —-                      —–
    1 .xlsx                     {Book1.xlsx}
    1 .pptx                     {Scripting with PowerShell.pptx}
    1 .docx                     {vbscript_to_powershell.docx}
    6 .txt                      {Files1.txt, Files2.txt, get-service-ps1.txt, hilfe.txt…}
    7 .doc                      {AW Administration Best Practices.doc, Corporate Management Guidelines.doc, Manager-…
    9 .ppt                      {Annual Meeting – Finance.ppt, Annual Meeting – Keynote.ppt, Annual Meeting – Travel…
    9 .xls                      {Annual Revenue Report.xls, Customer Base.xls, Employee Birthdays.xls, Equipment Inv…
   40 .tmp                      {~DF45C.tmp, ~DF463.tmp, ~DF4FE9.tmp, ~DF5012.tmp…}
   48 .png                      {arrow 0.png, arrow 1.png, arrow 2.png, arrow 3.png…}

PS FK:\> Get-ChildItem * -include *.tmp,*.temp | Measure-Object length -Maximum -Average -Minimum -sum

Count    : 40
Average  : 43494.4
Sum      : 1739776
Maximum  : 98304
Minimum  : 512
Property : Length

 


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: