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

Make Path Absolute Function
File Names Class

Public Function MakePathAbsolute( _
    ByVal vPath As Variant _
    ) As Variant

Creates an absolute path name from one that may be relative.

       CurDir$ = "C:\WINDOWS"
    for example
       MakePathAbsolute("WIN.INI") = "C:\WINDOWS\WIN.INI"
       MakePathAbsolute("\WIN.INI") = "C:\WIN.INI"
       MakePathAbsolute("C:WIN.INI") = "C:\WINDOWS\WIN.INI"
       MakePathAbsolute("C:\WIN.INI") = "C:\WIN.INI"
       MakePathAbsolute("C:\TEMP\.\WIN.TMP") = "C:\TEMP\WIN.TMP" ' #5
       MakePathAbsolute("C:\TEMP\..\WIN.TMP") = "C:\WIN.TMP" ' #6
See also:
    IsPathRelative Function
vPath: The path name that is to be made absolute. Function returns Null if vPath is Null or cannot be fixed-up to a string.
Definition: Absolute paths are those that specify a direct path to a file from the root of some named drive. All other path names are relative.
Note: Function also removes substrings like "\.\" or "\..\" as in examples #5 and #6.

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