Visual Basic Scripting Edition | 語言參考 |
向現(xiàn)有路徑后添加名稱。
object.BuildPath(path, name)
object
必選項(xiàng)。應(yīng)為 FileSystemObject 對(duì)象的名稱。
path
必選項(xiàng)。要附加 name 的現(xiàn)有路徑?梢允墙^對(duì)或相對(duì)路徑且無需指定現(xiàn)有文件夾。
name
必選項(xiàng)。要附加到現(xiàn)有 path 的名稱。
僅在必要時(shí),BuildPath 方法在現(xiàn)有路徑與該名稱之間插入附加路徑分隔符。
下面例子舉例說明如何使用 BuildPath 方法:
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 Object