PowerTip: Use PowerShell to Display Invalid File Names

PowerTip: Use PowerShell to Display Invalid File Names

  • Comments 2
  • Likes

Summary: Use Windows PowerShell to display invalid file name characters.

Hey, Scripting Guy! Question How can I use Windows PowerShell to display information about invalid file name characters?

Hey, Scripting Guy! Answer Use the System.IO.Path class and call the GetInvalidFileNameChars static method:

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment