SoFunction
Updated on 2025-04-10

VBS Tutorial: Method - GetAbsolutePathName Method

GetAbsolutePathName method

Returns a complete and well-meaning path from the specified path provided.

object.GetAbsolutePathName(pathspec)

parameter

object

Required option. Should be the name of FileSystemObject.

pathspec

Required option. The specified path, which is to be converted into a complete and well-defined path.

illustrate

If the path provides a complete reference starting from the root of the specified drive, the path is complete and meaningful. If the path specifies the root folder of a mapped drive, the path can only end with a path separator (\).

Assuming the current directory is c:\mydocuments\reports, the following table shows an exampleGetAbsolutePathNameThe operation performed by the method.

pathspec Return path
"c:" "c:\mydocuments\reports"
"c:.." "c:\mydocuments"
"c:\\\" "c:\"
"c:*.*\may97" "c:\mydocuments\reports\*.*\may97"
"region1" "c:\mydocuments\reports\region1"
"c:\..\..\mydocuments" "c:\mydocuments"

Applied to: FileSystemObject object