SanitizeDirectoryName Method
Sanitize the provided directory name by substituting a specified character for illegal values.
'Declaration
Public Shared Function SanitizeDirectoryName( _
ByVal As String, _
Optional ByVal As Boolean, _
Optional ByVal As Boolean, _
Optional ByVal As Char _
) As String
Parameters
- directoryName
- The name of the directory to sanitize.
- eliminateSpaces
- When true, treat whitespace as an illegal value
- lowerCaseOnly
- When true, ensure the final name is lower case.
- replaceChar
- The character to substitute for illegal values, must be legal.
Return Value
The sanitized directory name.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2