在已存在路徑后追加名稱。
object.BuildPath(path, name)
如果需要,BuildPath 方法會(huì)在已有路徑和名稱之間另外再插入一個(gè)路徑分隔符。
下面的例子說明了 BuildPath 方法的用法。
[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 方法 | GetBaseName 方法 | GetDriveName 方法 | GetExtensionName 方法 | GetFileName 方法 | GetParentFolderName 方法 | GetTempName 方法
應(yīng)用于:FileSystemObject 對(duì)象