The following example illustrates use of the
BuildPath method.
JScriptfunction GetBuildPath(path)
{
var fso, newpath;
fso = new ActiveXObject("Scripting.FileSystemObject");
newpath = fso.BuildPath(path, "Sub Folder");
return(newpath);
}
VBScriptFunction GetBuildPath(path)
Dim fso, newpath
Set fso = CreateObject("Scripting.FileSystemObject")
newpath = fso.BuildPath(path, "Sub Folder")
GetBuildPath = newpath
End Function
PowerBASICFUNCTION GetBuildPath (BYVAL strPath AS STRING) AS STRING
LOCAL fso AS IFileSystem
LOCAL bstrNewPath AS STRING
fso = NEWCOM "Scripting.FileSystemObject"
bstrNewPath = fso.BuildPath(UCODE$(strPath), UCODE$("Sub Folder"))
FUNCTION = ACODE$(bstrNewPath)
END FUNCTION