January 1, 2005

WinTask - PathMatchSpec

'
' PathMatchSpec - Searches a string using a Microsoft MS-DOS wild card match type.
'

' Author: Joe Strazzere

'

File$="c:joetest.txt"

'Spec$="*.txt"
'Spec$="*.*"
Spec$="*.doc"

 

ret=External("shlwapi.dll","PathMatchSpecA",File$,Spec$)

If ret = 0 then
    MsgBox(File$+" is not matched by "+Spec$)
Else
    MsgBox(File$+" is matched by "+Spec$)
EndIf