by Programming Innovations (7 Submissions)
Category: Files/File Controls/Input/Output
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 19th August 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Combines two strings (filename and path) into a full path.
If Right(sPath, 1) = "\" And Left(sFile, 1) <> "\" Then
CreateFullPath = sPath & sFile
ElseIf Right(sPath, 1) <> "\" And Left(sFile, 1) = "\" Then
CreateFullPath = sPath & sFile
ElseIf Right(sPath, 1) <> "\" And Left(sFile, 1) <> "\" Then
CreateFullPath = sPath & "\" & sFile
ElseIf Right(sPath, 1) = "\" And Left(sFile, 1) = "\" Then
CreateFullPath = Left(sPath, Len(sPath) - 1) & sFile
End If
End Function