The FileSystemObject VBA GetAbsolutePathName function returns a complete and unambiguous path to a file or folder based on the provided file or folder path.
This function is useful for reuse for other functions where unambiguous file or folder paths need to be use.
VBA FileSystemObject Methods
- BuildPath
- CopyFile
- CopyFolder
- CreateFolder
- CreateTextFile
- DeleteFile
- DeleteFolder
- DriveExists
- FileExists
- FolderExists
- GetAbsolutePathName
- GetBaseName
- GetDrive
- GetDriveName
- GetExtensionName
- GetFile
- GetFileName
- GetFolder
- GetParentFolderName
- GetSpecialFolder
- GetTempName
- MoveFile
- MoveFolder
- OpenTextFile
VBA GetAbsolutePathName Syntax
fso.GetAbsolutePathName( path )
path
A path that you want to convert to unambiguous file and folder.
VBA GetAbsolutePathName Examples
Set fso = CreateObject("Scripting.FileSystemObject") fso.GetAbsolutePathName( "Src" ) 'Result: "C:\Src" fso.GetAbsolutePathName( "C:\..\Somefolder*\" ) 'Result: "C:\Src\Somefolder\"