Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wildcard search problems

Status
Not open for further replies.

TheBigGuy

Programmer
Joined
Oct 11, 2000
Messages
2
Location
AU
I have a problem, whereby a directory is being listed through and a comparison is being performed between each filename (name) and a wildcard search string '*CHK*.afx'. Any filenames which should be picked out by the wildcard comparison aren't, and as a result, the code keeps jumping to the <cfelse> statement (2)

<cfloop query=&quot;FTP_Dirlist&quot;>
<cfif name eq '*CHK*.txt'>
.....do something (1)
<cfelse>
.....do something else (2)
</cfif>
</cfloop>

If anyone could help would be v.much appreciated! [sig][/sig]
 
seems that you need reg expression here !
so either use jscript validation, or the cf function REFindNoCase (should be fine here !!)
maybe you only need to check if there's the &quot;CHK&quot; string in your file name (and then &quot;.txt&quot;), in that case you can try the Find (or FindNoCase) cf function as well
hope that helped !
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top