UDF > WinAPIEx > ShellPath >


_WinAPI_PathRemoveFileSpec

Supprime le nom de fichier et la barre oblique inverse qui le pr�c�de dans un chemin, si ils sont pr�sents

#include <WinAPIShPath.au3>
_WinAPI_PathRemoveFileSpec ( $sFilePath )

Param�tre

$sFilePath Le chemin dans lequel supprimer le nom du fichier.

Valeur de retour

Retourne le chemin sans nom de fichier, @extended non nul si quelque chose a �t� supprim�.

Voir aussi

Consultez PathRemoveFileSpec dans la librairie MSDN.

Exemple

#include <WinAPIShPath.au3>

Local $sPath = 'C:\Documents\Test.txt'

ConsoleWrite('Avant: ' & $sPath & @CRLF)
ConsoleWrite('Apr�s: ' & _WinAPI_PathRemoveFileSpec($sPath) & @CRLF)