# Function Reference

# _WinAPI_PathSearchAndQualify

Formats a path to the fully qualified path

#include <WinAPIShPath.au3>
_WinAPI_PathSearchAndQualify ( $sFilePath [, $bExists = False] )

## Parameters

$sFilePath | The path to be formated.
$bExists | [optional] Specifies whether the path should be existing, valid values: True - The path must be an existing path, otherwise, the function fails. False - The path may not exist (Default).

## Return Value

Success: | The formated path.
Failure: | Empty string and sets the @error flag to non-zero.

## See Also

Search PathSearchAndQualify in MSDN Library.

## Example

    #include <WinAPIShPath.au3>

    Local Const $sPath1 = 'C:\\Test\\'
    Local Const $sPath2 = 'C:/Test/Test.txt'
    Local Const $sPath3 = 'Notepad.exe'

    ConsoleWrite($sPath1 & ' => ' & _WinAPI_PathSearchAndQualify($sPath1) & @CRLF)
    ConsoleWrite($sPath2 & ' => ' & _WinAPI_PathSearchAndQualify($sPath2) & @CRLF)
    ConsoleWrite($sPath3 & ' => ' & _WinAPI_PathSearchAndQualify($sPath3) & @CRLF)