PowerTip: Use PowerShell to Show Illegal File Name Characters

Doctor Scripto

Summary: Use Windows PowerShell to display illegal characters for a file name.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily obtain a list of characters that are not permitted in file names?

Hey, Scripting Guy! Answer Use the GetInvalidFileNameChars static method from the System.IO.Path .NET Framework class:

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

0 comments

Discussion is closed.

Feedback usabilla icon