UDF > WinAPIEx > ShellPath >


_WinAPI_PathMatchSpec

D�termine si un chemin matche un mod�le avec des caract�res g�n�riques de type Microsoft MS-DOS

#include <WinAPIShPath.au3>
_WinAPI_PathMatchSpec ( $sFilePath, $sSpec )

Param�tres

$sFilePath Le chemin dans lequel rechercher.
$sSpec Le type de fichier � rechercher. Par exemple, pour tester si $sFilePath est un fichier doc, $sSpec doit �tre d�fini � "*.doc".

Valeur de retour

Succ�s: Retourne True - La cha�ne correspond.
�chec: Retourne False.

Voir aussi

Consultez PathMatchSpec dans la librairie MSDN.

Exemple

#include <Array.au3>
#include <File.au3>
#include <WinAPIShPath.au3>

_Example()
Func _Example()
    Local $aFileList = _FileListToArray(@SystemDir, '*.dll', 1)
    Local $aSortList[UBound($aFileList) - 1]
    Local $iCount = 0

    For $i = 1 To $aFileList[0]
        If _WinAPI_PathMatchSpec($aFileList[$i], 'net*.dll') Then
            $aSortList[$iCount] = $aFileList[$i]
            $iCount += 1
        EndIf
    Next
    If $iCount Then
        ReDim $aSortList[$iCount]
            _ArrayDisplay($aSortList, '_WinAPI_PathMatchSpec')
    EndIf

EndFunc   ;==>_Example