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 }

2012/11/21

Powershll 對於特殊符號目錄的處理

參考資料:

http://surroundingthecode.wordpress.com/2010/04/17/powershell-file-names-special-characters-frustration-eventually/


90% 症候群