Recursively Fix Non-ASCII Characters with Windows Power Shell

Simnple replace “your-directory” with the path you want. Or can you run in the directory you are currently in by using “.” no quotes.
Happy coding.

gci -recurse your-directory | where {$_.Name -match "[^\u0000-\u007F]"} | rename-item -newname {$_.name -replace "[^\u0000-\u007F]","1"}

Leave a Reply