Searches a string using a Microsoft MS-DOS wild card match type
#include <WinAPIShPath.au3>
_WinAPI_PathMatchSpec ( $sFilePath, $sSpec )
$sFilePath | The path to be searched. |
$sSpec | The file type for which to search. For example, to test whether $sFilePath is a .doc file, $sSpec should be set to "*.doc". |
Success: | True - The string matches. |
Failure: | False. |
Search PathMatchSpec in MSDN Library.
#include <Array.au3>
#include <File.au3>
#include <WinAPIShPath.au3>
Local $sFileList = _FileListToArray(@SystemDir, '*.dll', 1)
Local $aSortList[UBound($sFileList) - 1]
Local $iCount = 0
For $i = 1 To $sFileList[0]
If _WinAPI_PathMatchSpec($sFileList[$i], 'net*.dll') Then
$aSortList[$iCount] = $sFileList[$i]
$iCount += 1
EndIf
Next
If $iCount Then
ReDim $aSortList[$iCount]
Else
Exit
EndIf
_ArrayDisplay($aSortList, '_WinAPI_PathMatchSpec')