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

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.