string to FolderName

 <Extension()>
    Public Function toPath(conteudo As String) As String
        conteudo = conteudo.Replace("/", "")
        conteudo = conteudo.Replace("\", "")
        conteudo = conteudo.Replace(":", "")
        conteudo = conteudo.Replace("*", "")
        conteudo = conteudo.Replace("?", "")
        conteudo = conteudo.Replace("<", "")
        conteudo = conteudo.Replace(">", "")
        conteudo = conteudo.Replace("|", "")
        Return conteudo
    End Function
Example:
filename.toPath()

Description

Remove caracteres não permitidos para nomes de pastas

Details

Double click on the code to select all.

 

;