UDF > WinAPIEx > ShellPath >


_WinAPI_PathCompactPathEx

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 )

Paramètres

$sFilePath Le chemin à modifier.
$iMax Le nombre maximum de caractères dans lequel le chemin doit tenir.

Valeur de retour

Succès: Retourne le chemin modifié.
Échec: Retourne le paramètre d'origine $sFilePath et définit @error <> 0.

Voir aussi

Consultez PathCompactPathEx dans la librairie MSDN.

Exemple

#include <WinAPIShPath.au3>

Local $sPath = @ScriptFullPath

ConsoleWrite('Avant: ' & $sPath & @CRLF)
ConsoleWrite('Après: ' & _WinAPI_PathCompactPathEx($sPath, 40) & @CRLF)