Compares two paths to determine if they share a common prefix
#include <WinAPIShPath.au3>
_WinAPI_PathCommonPrefix ( $sPath1, $sPath2 )
$sPath1 | The first path name. |
$sPath2 | The second path name. |
Search PathCommonPrefix in MSDN Library.
#include <WinAPIShPath.au3>
Local $sPath1 = 'C:\Documents\Test.txt'
Local $sPath2 = 'C:\Documents\Archive\Sample.txt'
ConsoleWrite('Path1 : ' & $sPath1 & @CRLF)
ConsoleWrite('Path2 : ' & $sPath2 & @CRLF)
ConsoleWrite('Prefix: ' & _WinAPI_PathCommonPrefix($sPath1, $sPath2) & @CRLF)