GetAbsolutePathName Method


Returns a complete and unambiguous path from a provided path specification.




  • object
    Required. Always the name of a FileSystemObject.

  • pathspec
    Required. Path specification to change to a complete and unambiguous path.


A path is complete and unambiguous if it provides a complete reference from the root of the specified drive. A complete path can only end with a path separator character (\) if it specifies the root folder of a mapped drive.

Assuming the current directory is c:\mydocuments\reports, the following table illustrates the behavior of the GetAbsolutePathName method.

pathspec (JScript)

pathspec (VBScript)

Returned path



















The following example illustrates the use of the GetAbsolutePathName method.

function ShowAbsolutePath(path)
   var fso, s= "";
   fso = new ActiveXObject("Scripting.FileSystemObject");
   s += fso.GetAbsolutePathName(path);
Function ShowAbsolutePath(path)
   Dim fso
   Set fso = CreateObject("Scripting.FileSystemObject")
   ShowAbsolutePath = fso.GetAbsolutePathName(path)
End Function

Applies To:

FileSystemObject Object

See Also

GetBaseName Method
GetDrive Method
GetDriveName Method
GetExtensionName Method
GetFile Method
GetFileName Method
GetFileVersion Method
GetFolder Method
GetParentFolderName Method
GetSpecialFolder Method
GetTempName Method