Remove-InvalidFileNameChars
1.4
Remove-InvalidFileNameChars accepts a string and removes characters that are invalid in Windows file names. It then outputs the cleaned string. By default the space character is ignored, but can be included using the RemoveSpace parameter.
The Replacement parameter will replace the invalid characters with the specified string.
The Name parameter can also clean
The Replacement parameter will replace the invalid characters with the specified string.
The Name parameter can also clean
Remove-InvalidFileNameChars accepts a string and removes characters that are invalid in Windows file names. It then outputs the cleaned string. By default the space character is ignored, but can be included using the RemoveSpace parameter.
The Replacement parameter will replace the invalid characters with the specified string.
The Name parameter can also clean file paths. If the string begins with "\\" or a drive like "C:\", it will then treat the string as a file path and clean the strings between "\". This has the side effect of removing the ability to actually remove the "\" character from strings since it will then be considered a divider.
Show more
The Replacement parameter will replace the invalid characters with the specified string.
The Name parameter can also clean file paths. If the string begins with "\\" or a drive like "C:\", it will then treat the string as a file path and clean the strings between "\". This has the side effect of removing the ability to actually remove the "\" character from strings since it will then be considered a divider.
Installation Options
Owners
Copyright
2016 Chris Carter
Package Details
Author(s)
- Chris Carter
Tags
RegularExpression StringFormatting InvalidFileNameCharacters
Functions
Dependencies
This script has no dependencies.
FileList
- Remove-InvalidFileNameChars.nuspec
- Remove-InvalidFileNameChars.ps1
Version History
Version | Downloads | Last updated |
---|---|---|
1.5.1 | 1,256 | 8/16/2016 |
1.4 (current version) | 79 | 3/7/2016 |