Skip to content

Instantly share code, notes, and snippets.

@peterdalle
Created August 5, 2021 19:03
Show Gist options
  • Save peterdalle/9f4f0def1e571c8f204aafd04780642f to your computer and use it in GitHub Desktop.
Save peterdalle/9f4f0def1e571c8f204aafd04780642f to your computer and use it in GitHub Desktop.
Find filenames with names over 140 characters
Out-File long-files.txt ; cmd /c "dir z:\ /b /s /a" | ForEach-Object { if ($_.length -gt 140) {$_ | Out-File -append long-files.txt}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment