FileSystemObject.GetAbsolutePathName Method (VB6)

Named Arguments

Yes

Syntax

oFileSysObj.GetAbsolutePathName(Path)

oFileSysObj

Use: Required

Data Type: FileSystemObject object

Any object variable returning a FileSystemObject object.

Path

Use: Required

Data Type: String

A path specifier.

Return Value

A string containing the absolute path of a given path specifier.

Description

Converts a relative path to a fully qualified path, including the drive letter.

Rules at a Glance

  • "." returns the drive letter and complete path of the current folder.

  • ".." returns the drive letter and path of the parent of the current folder.

  • "filename" returns the drive letter and path up to and including filename within the current folder.

  • All relative path names are assumed to originate at the current folder.

  • If a drive isn't explicitly provided as part of Path, it's assumed to be the current drive.

  • Wildcard characters can be included in path at any point.

Programming Tips and Gotchas

  • For mapped network drives and shares, the method doesn't return the full network address. Rather, it returns the fully qualified local path and locally issued drive letter.

  • GetAbsolutePathName doesn't verify that a given file or folder exists in the path specified.

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.