Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid subscript reference
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01173721
Message ID:
01173879
Views:
11
>>No, this is valid, but if you have
>>m.tcExt = [*]
>>You will get all the files that have m.lcCheck in their names AND extension.
>>But if you have this:
>>
>>IF ADIR(laFiles, m.HomeImg + "*G*.J*") >=1
>>
>>You will get all the files that will have [G] in their names and their extension begins with [J]
>>If you have this:
>>
>>IF ADIR(laFiles, m.HomeImg + "*G*.*J*") >=1
>>
>>You will get all the files that will have [G] in their names and their extension have [J] somewhere.
>>(again all of these cases are not properly tested).
>
>I think I'm going crazy with this. I just tried w-e4s5 and it returns
>
>K-NK1648PS.JPG
>
>My last search was on E4 portion, but I do not see E4 in this. What's going on?
>
>I was searching adir(laFiles, "t:\jpg\*E4*.jpg").
>
>Why do I have this strange file returned?

Whit both versions (8 and 9) I can't get this file when I use:
adir(laFiles, "D:\jpg\*E4*.jpg").
(I have a file named K-NK1648PS.JPG in that folder)

Why not try something like this:
CREATE CURSOR crsTest (FieldName M)
lcFileName = SYS(2000,[*.*]) && All files
DO WHILE NOT EMPTY(lcFileName)
   IF LIKE(UPPER(myStemPart), UPPER(JUSTSTEM(lcFileName))) OR;
      LIKE(UPPER(myExtPart), UPPER(JUSTEXT(lcFileName)))
      INSERT INTO crsTest VALUES (m.lcFileName)
   ENDIF
   lcFileName = SYS(2000,[*.*],1)
ENDDO
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform