Retrieves the full path and file name of the specified file
#include <WinAPIFiles.au3>
_WinAPI_GetFullPathName ( $sFilePath )
$sFilePath | The name of the file. |
Success: | The drive and path. |
Failure: | Empty string, call _WinAPI_GetLastError() to get extended error information. |
The _WinAPI_GetFullPathName() merges the name of the current drive and directory with a specified file name to determine the full path and file name of a specified file.
This function does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.
Search GetFullPathName in MSDN Library.
#include <WinAPIFiles.au3>
Local Const $sPath1 = 'Test.txt'
Local Const $sPath2 = 'Test\Test.txt'
Local Const $sPath3 = 'C:\Test\Test.txt'
ConsoleWrite($sPath1 & ' => ' & _WinAPI_GetFullPathName($sPath1) & @CRLF)
ConsoleWrite($sPath2 & ' => ' & _WinAPI_GetFullPathName($sPath2) & @CRLF)
ConsoleWrite($sPath3 & ' => ' & _WinAPI_GetFullPathName($sPath3) & @CRLF)