函数参考


_WinAPI_PathUndecorate

Removes the decoration from a path string.

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

参数

$sPath The path.

返回值

Success The undecorated string.
Failure Empty string and sets the @error flag to non-zero.

注意/说明

None

相关

详情参考

在MSDN中搜索


示例/演示


#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $Path[4] = ['C:\Path\File[5].txt', 'C:\Path\File[12]', 'C:\Path\File.txt', 'C:\Path\[3].txt']

For $i = 0 To 3
    ConsoleWrite(StringFormat('%-22s' & _WinAPI_PathUndecorate($Path[$i]), $Path[$i]) & @CR)
Next