VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Combines two strings (filename and path) into a full path.

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.

Rate 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

Download this snippet    Add to My Saved Code

Combines two strings (filename and path) into a full path. Comments

No comments have been posted about Combines two strings (filename and path) into a full path.. Why not be the first to post a comment about Combines two strings (filename and path) into a full path..

Post your comment

Subject:
Message:
0/1000 characters