| FileSystemObject.BuildPath Method (VB6) |
Syntax
oFileSysObj.BuildPath(Path, Name)
oFileSysObj
Use: Required
Data Type: FileSystemObject object
Any object variable returning a FileSystemObject object.
Path
Use: Required
Data Type: String
A drive and/or folder path.
Name
Use: Required
Data Type: String
The folder or file path to append to path.
Return Value
String
Description
Creates a string by concatenating the path parameter with the folder or filename, adding, where required, the correct path separator for the host system.
Rules at a Glance
Path can be an absolute or relative path and doesn't have to include the drive name.
Neither Path nor Name has to currently exist.
BuildPath doesn't check the validity of the new folder or filename.
Programming Tips and Gotchas
The only advantage to using the BuildPath function as opposed to concatenating two strings manually is that the function selects the correct path separator.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access