Truncates a path to fit within a certain number of characters by replacing path components with ellipses
#include <WinAPIShPath.au3>
_WinAPI_PathCompactPathEx ( $sFilePath, $iMax )
$sFilePath | The path to be modified. |
$iMax | The maximum number of characters to be contained in the modified path. |
Success: | The modified path. |
Failure: | The original $sFilePath parameter and sets the @error flag to non-zero. |
Search PathCompactPathEx in MSDN Library.
#include <WinAPIShPath.au3>
Local $sPath = @ScriptFullPath
ConsoleWrite('Before: ' & $sPath & @CRLF)
ConsoleWrite('After : ' & _WinAPI_PathCompactPathEx($sPath, 40) & @CRLF)