The following example illustrates the use of the
GetAbsolutePathName method.
JScript
function GetTheAbsolutePath(path)
{
var fso, s= "";
fso = new ActiveXObject("Scripting.FileSystemObject");
s += fso.GetAbsolutePathName(path);
return(s);
}
VBScript
Function GetTheAbsolutePath(path)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
GetTheAbsolutePath = fso.GetAbsolutePathName(path)
End Function
PowerBASIC
FUNCTION GetTheAbsolutePath (BYVAL strPath AS STRING) AS STRING
LOCAL fso AS IFileSystem
fso = NEWCOM ("Scripting.FileSystemObject")
FUNCTION = ACODE$(fso.GetAbsolutePathName(UCODE$(strPath)))
END FUNCTION