Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

BuildPath Method

Appends a name to an existing path.

object.BuildPath(path, name)

Arguments

object

Required. Always the name of a FileSystemObject.

path

Required. Existing path to which name is appended. Path can be absolute or relative and need not specify an existing folder.

name

Required. Name being appended to the existing path.

Remarks

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:

Function GetBuildPath(path)
   Dim fso, newpath
   Set fso = CreateObject("Scripting.FileSystemObject")
   newpath = fso.BuildPath(path, "Sub Folder") 
   GetBuildPath = newpath
End Function

See Also

GetAbsolutePathName Method | GetBaseName Method | GetDriveName Method | GetExtensionName Method | GetFileName Method | GetParentFolderName Method | GetTempName Method

Applies To: FileSystemObject Object


     Loans | Free Ringtone | Credit Counseling | Credit Cards | Credit Counseling
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp