<-- Previous || Up || Next -->

Combine Drive And Path Function
File Names Class

Public Function CombineDriveAndPath( _
      ByVal vDrive As Variant _
    , ByVal vPath As Variant _
    ) As Variant

Combines the drive and path name portions of a file name to produce an absolute path name.

Examples:
    CombineDriveAndPath("C",   "WINDOWS")  = "C:WINDOWS"  ' #1; Note no \
    CombineDriveAndPath("C",   "\WINDOWS") = "C:\WINDOWS" ' #2; Note C to C:
    CombineDriveAndPath("C:",  "WINDOWS")  = "C:WINDOWS"  ' #3; Note no \
    CombineDriveAndPath("C:",  "\WINDOWS") = "C:\WINDOWS"
    CombineDriveAndPath("C:\", "WINDOWS")  = "C:\WINDOWS"
    CombineDriveAndPath("C:\", "\WINDOWS") = "C:\WINDOWS"
    CombineDriveAndPath("\\SJS4",  "ENTISOFT")  = "\\SJS4\ENTISOFT"
    CombineDriveAndPath("\\SJS4",  "\ENTISOFT") = "\\SJS4\ENTISOFT"
    CombineDriveAndPath("\\SJS4\", "ENTISOFT")  = "\\SJS4\ENTISOFT"
    CombineDriveAndPath("\\SJS4\", "\ENTISOFT") = "\\SJS4\ENTISOFT"
See also:
    CombinePathAndFile Function
    CombinePrefixAndExtension Function
    SeparateDriveAndPath Function
vDrive: Drive letter or UNC drive name that will be combined with vPath. Function returns Null if vDrive is Null or cannot be fixed-up to a string.
vPath: Path portion of a file name that will be combined with vDrive. Function returns Null if vPath is Null or cannot be fixed-up to a string.
Note: Similar to the CombinePathAndFile function except in cases where the first argument is a single letter as in examples #1 and #2.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.