Removes the path portion of a fully qualified path and file.
#Include <WinAPIEx.au3>
_WinAPI_PathStripPath ( $sPath )
$sPath | The path and file name. |
Success | The string contains only the file name, with the path removed. |
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_PathStripPath($Path) & @CR)