2012/12/13

PowerShell: How to group files by date using PowerShell?

http://stackoverflow.com/questions/2520775/how-to-group-files-by-date-using-powershell



Get-ChildItem \\10.10.10.1\myweb\inetpub\work\finished -Recurse | Group { $_.LastWr
iteTime.ToString("yyyy-MM-dd hh") } | Sort Name | Format-Table Name, Count -auto

PowerShell: 刪除目錄內小於某個日期的所有檔案

Get-ChildItem \\10.10.10.1\data\upload\pic -Recurse | Select-Object FullName, LastWriteTime | Where-Object { $_.LastWriteTime -lt '2012/11/30 23:59:59' } | % { Remove-Item $_.FullName -Recurse -Force -Verbose }

軟體工程的重要的指標