0%

找出大於1GB的shp

 

工作上時常需要處理地理資料 ShapeFile , 有時候會需要找出超過軟體大小限制為 1GB 的 , 可以參考以下 powershell 命令

1
2
3
4
5
6
$files = Get-ChildItem D:\ -Recurse | Where-Object {$_.Extension -eq ".shp"  -and $_.Length/1GB -gt 1 } |
Sort-Object -Property Length -Descending

foreach($f in $files ){
$f.FullName
}
關閉