• Welcome to Jose's Read Only Forum 2023.
 

IFileSystem.GetAbsolutePathName Method

Started by José Roca, July 14, 2008, 02:55:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca



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