Parses a path, ignoring the drive letter or Universal Naming Convention (UNC) server/share path elements.
#Include <WinAPIEx.au3>
_WinAPI_PathSkipRoot ( $sPath )
$sPath | The path to parse. |
Success | The string contains only subpath that follows the root (drive letter or UNC server/share). |
Failure | Empty string and sets the @error flag to non-zero. |
在MSDN中搜索
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $Path = 'C:\Documents\Test.txt'
ConsoleWrite('Before: ' & $Path & @CR)
ConsoleWrite('After : ' & _WinAPI_PathSkipRoot($Path) & @CR)