Function Reference


_WinAPI_PathCompactPathEx

Truncates a path to fit within a certain number of characters by replacing path components with ellipses

#include <WinAPIShPath.au3>
_WinAPI_PathCompactPathEx ( $sFilePath, $iMax )

Parameters

$sFilePath The path to be modified.
$iMax The maximum number of characters to be contained in the modified path.

Return Value

Success: The modified path.
Failure: The original $sFilePath parameter and sets the @error flag to non-zero.

See Also

Search PathCompactPathEx in MSDN Library.

Example

#include <WinAPIShPath.au3>

Local $sPath = @ScriptFullPath

ConsoleWrite('Before: ' & $sPath & @CRLF)
ConsoleWrite('After : ' & _WinAPI_PathCompactPathEx($sPath, 40) & @CRLF)