Created
August 2, 2017 17:22
-
-
Save cwg999/325268a67d18317e0eee80100d9eb299 to your computer and use it in GitHub Desktop.
Given a parent folder name, output file names greater than a certain size.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem -Path .\ -Recurse | Where-Object { | |
$_ -is [System.IO.FileInfo] ` | |
-and (($_.Directory.Name -eq 'Single' ` | |
-and $_.Length -gt (1*1024*1204)) ` | |
-or ($_.Directory.Name -eq 'Multiple' ` | |
-and $_.Length -gt (7*1024*1204))) | |
} | ForEach-Object {$_.FullName} | |
Write-Host "Press any key to continue ..." | |
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | |
Write-Host | |
Write-Host "Finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment