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 )
$sFilePath | Le chemin dans lequel supprimer le nom du fichier. |
Retourne le chemin sans nom de fichier, @extended non nul si quelque chose a été supprimé.
Consultez PathRemoveFileSpec dans la librairie MSDN.
#include <WinAPIShPath.au3> Local $sPath = 'C:\Documents\Test.txt' ConsoleWrite('Avant: ' & $sPath & @CRLF) ConsoleWrite('Après: ' & _WinAPI_PathRemoveFileSpec($sPath) & @CRLF)