July 31st, 2014

PowerTip: Use PowerShell to Display Invalid File Names

Doctor Scripto
Scripter

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()

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback