Sub AddBackslash($s As String) As String


Adds a trailing backslash character, if it does not already exist in the specified directory string.


Parameters


  • $s ... String expression that specifies a directory path, with or without a trailing backslash.


Example:

Dim $s

$s = AddBackslash("e:\exp")
' returns $s = "e:\exp\"

$s = AddBackslash("e:\exp\")
' returns $s = "e:\exp\"