Removes the file name extension from a path, if one is present.
#Include <WinAPIEx.au3>
_WinAPI_PathRemoveExtension ( $sPath )
$sPath | The path from which to remove the extension. |
Success | The path without extension. |
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_PathRemoveExtension($Path) & @CR)