Appends a name to an existing path.
object.BuildPath(path, name)
The BuildPath method inserts an additional path separator between the existing path and the name, only if necessary.
The following example illustrates use of the BuildPath method.
[JScript] function GetBuildPath(path) { var fso, newpath; fso = new ActiveXObject("Scripting.FileSystemObject"); newpath =fso.BuildPath(
path, "New Folder")
; return(newpath); } [VBScript] Function GetBuildPath(path) Dim fso, newpath Set fso = CreateObject("Scripting.FileSystemObject") newpath =fso.BuildPath(
path,
"Sub Folder")
GetBuildPath = newpath End Function
GetAbsolutePathName Method | GetBaseName Method | GetDriveName Method | GetExtensionName Method | GetFileName Method | GetParentFolderName Method | GetTempName Method
Applies To: FileSystemObject Object