1
0
mirror of https://github.com/jaapbrasser/SharedScripts.git synced 2025-12-24 21:51:38 +02:00

Updated code

This commit is contained in:
Jaap Brasser
2017-10-30 16:33:26 +01:00
parent a0976e4309
commit 181964b066

View File

@@ -40,8 +40,10 @@ Description
$TopFile = '${P_DisplayTopFileExt}'
)
$ErrorActionPreference = 'SilentlyContinue'
$Extension.Split(',') | ForEach-Object {
Get-ChildItem $FolderPath -Include "*$_" -Recurse -ErrorAction SilentlyContinue |
Get-ChildItem $FolderPath -Include "*$_" -Recurse -Force |
Sort-Object -Property Length -Descending |
Select-Object -First $TopFile -Property @{
Name = 'SizeMB'