Created
October 1, 2020 14:51
-
-
Save lansalot/19c899b770c312262a81c15c9fa118af to your computer and use it in GitHub Desktop.
Find a filename with a bad character in it
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
[System.Text.Encoding]::UTF8.GetBytes( ((dir badfilename.txt).Name)) | |
That showed me the bad filenames had char(127) in them | |
So dir c:\pathwithbadfiles -recurse -ea silentlycontinue | Where-Object { $_.Name.ToCharArray() -eq 127} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment