Function Reference


_WinAPI_PathAppend

Appends one path to the end of another

#include <WinAPIShPath.au3>
_WinAPI_PathAppend ( $sFilePath, $sMore )

Parameters

$sFilePath The string to which the path is appended.
$sMore The path to be appended.

Return Value

Returns the resulting path string.

Remarks

This function automatically inserts a backslash between the two strings, if one is not already present.

The first path cannot begin with "..\\" or ".\\" to produce a relative path string. If present, those periods are
stripped from the output string. For example, appending "path3" to "..\\path1\\path2" results in an output
of "\path1\path2\path3" rather than "..\path1\path2\path3".

See Also

Search PathAppend in MSDN Library.

Example

#include <WinAPIShPath.au3>

Local $sPath1 = 'C:\Documents\Text'
Local $sPath2 = '..\Test.txt'

ConsoleWrite('Path1 : ' & $sPath1 & @CRLF)
ConsoleWrite('Path2 : ' & $sPath2 & @CRLF)
ConsoleWrite('Result: ' & _WinAPI_PathAppend($sPath1, $sPath2) & @CRLF)