Created
March 25, 2016 15:23
-
-
Save iOnline247/0b9ef3037f509dfffb98 to your computer and use it in GitHub Desktop.
Generates a report on files within a directory.
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
# https://www.petri.com/powershell-problem-solver-finding-long-file-names | |
$folderPath = "\\servername\c$\folderPath" | |
$csvPath = "C:\fileLengthCheck.csv" | |
dir -LiteralPath $folderPath -File -Recurse -Force | | |
Select Directory,Name,@{Name="NameLength";Expression={$_.name.length}} | | |
Where {$_.NameLength -ge 45} | | |
Export-Csv -LiteralPath $csvPath -Force -NoTypeInformation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment