Tronque un chemin pour tenir dans un certain nombre de caractères en remplaçant des composants du chemin par trois points
#include <WinAPIShPath.au3>
_WinAPI_PathCompactPathEx ( $sFilePath, $iMax )
$sFilePath | Le chemin à modifier. |
$iMax | Le nombre maximum de caractères dans lequel le chemin doit tenir. |
Succès: | Retourne le chemin modifié. |
Échec: | Retourne le paramètre d'origine $sFilePath et définit @error <> 0. |
Consultez PathCompactPathEx dans la librairie MSDN.
#include <WinAPIShPath.au3> Local $sPath = @ScriptFullPath ConsoleWrite('Avant: ' & $sPath & @CRLF) ConsoleWrite('Après: ' & _WinAPI_PathCompactPathEx($sPath, 40) & @CRLF)