For one particular string in each of 90.000 files, I want to determine if this string contains a certain name. An external program retrieves the string from the file and the function @WILD determines whether this string matches a name.
Before the @WILD function starts, the names are loaded as part of an array:
The search start with:
This search worked fast and without any problem. But, in the last months the array has grown to more than 400 names
Question: is there another faster way to search with TCMD?
Before the @WILD function starts, the names are loaded as part of an array:
Code:
SETARRAY /F m[40,1]
SET m[0,0]= 2rebels
SET m[1,0]= a2-type
SET m[2,0]=…
…
Code:
DO r = 0 TO %@DEC[%@arrayinfo[m,1]]
IFF %@WILD["%String",*%m[%r,0]*] == 1 THEN
REM Name found in string
LEAVE
ELSE
REM Name not found in string
ENDIFF
ENDDO
SETARRAY /F m[443,1]
and the search now takes 2 seconds per string. For 90.000 files to search, it takes more than 2 days.Question: is there another faster way to search with TCMD?