How to group files by date using PowerShell?

Posted by Shane Cusson on Stack Overflow See other posts from Stack Overflow or by Shane Cusson
Published on 2010-03-26T02:13:35Z Indexed on 2010/03/26 2:23 UTC
Read the original article Hit count: 369

Filed under:
|
|
|

I have a folder with 2000+ files. I want to count the files by date.

so with:

  Mode                LastWriteTime     Length Name  
   ----                -------------     ------ ----  
   -a---        2010-03-15  12:54 AM   10364953 file1.txt  
   -a---        2010-03-15   1:07 AM   10650503 file2.txt  
   -a---        2010-03-16   1:20 AM   10118657 file3.txt  
   -a---        2010-03-16   1:33 AM    9735542 file4.txt  
   -a---        2010-03-18   1:46 AM   10666979 file5.txt  

I'd like to see:

Date         Count
----------   ------
2010-03-15   2  
2010-03-16   2  
2010-03-18   1

Thanks!

© Stack Overflow or respective owner

Related posts about powershell

Related posts about grouping