Get the list of invalid chars in file’s name

Hello,

.Net framework provides us a nice method to get all the invalid chars in file’s name :

[System.IO.Path]::GetInvalidFileNameChars()

GetInvalidCharFileName

You have the same for paths :

[System.IO.Path]::GetInvalidPathChars()

GetInvalidPathChar

Leave a Reply