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.
- 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
1 | fso.GetAbsolutePathName( path ) |
path
A path that you want to convert to unambiguous file and folder.
VBA GetAbsolutePathName Examples
1 2 3 4 5 | Set fso = CreateObject( "Scripting.FileSystemObject" ) fso.GetAbsolutePathName( "Src" ) 'Result: "C:\Src" fso.GetAbsolutePathName( "C:\..\Somefolder*\" ) 'Result: " C:\Src\Somefolder\" |