函数参考


_WinAPI_PathStripToRoot

Removes all parts of the path except for the root information.

#Include <WinAPIEx.au3>
_WinAPI_PathStripToRoot ( $sPath )

参数

$sPath The path to be converted.

返回值

Success The string contains only the root information taken from that path.
Failure Empty string and sets the @error flag to non-zero.

注意/说明

None

相关

详情参考

在MSDN中搜索


示例/演示


#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $Path = 'C:\Documents\Test.txt'

ConsoleWrite('Before: ' & $Path & @CR)
ConsoleWrite('After : ' & _WinAPI_PathStripToRoot($Path) & @CR)