Perhaps it's a WinXP problem. I'm on Win2k with VFP9. If I run:
ADir(aFls, "c:\winnt\system32\*x*.dll"
I get 174 files and they are correct (they all contain "x" and are all DLLs)
If I use:
Sys(2000, "c:\winnt\system32\*x*.dll") (and ',1' for next in a loop)
I get 174 files and they are correct.
If I change the "x" to "ax", I get 20 correct files in both cases.
I'll try to remember to try this at home where I have WinXP
>Randall,
>
>Your test is irrelevant. You need to try with a directory with a huge number of files. Try windows\system32. Also you need to give some mask, say *p*. I haven't run this test on this directory myself (busy at the moment), but I have 6K files there. It would be preferable to have this test on a directory with more than 13K files.
>
>>Howdy Naomi,
>>
>>>I modified the test program slightly to get lcMask by Inputbox and for E3 I have 11 wrong files:
>>>
>>>W-ER4026D.JPG
>>>W-ER4036D.JPG
>>>W-ER4056D.JPG
>>>W-ER4066D.JPG
>>>W-TB2211D.JPG
>>>W-TB1022D.JPG
>>>W-NK646CIT.JPG
>>>W-TB2209D.JPG
>>>W-TB2408D.JPG
>>>W-TB2289A.JPG
>>>W-TB2448D.JPG
>>>
>>>I think I can stop testing for now.
>>
>>
>>I tried the following code (slightly modified) with no problems with VFP 9 SP1:
>>
>>
>>
>>#define crlf CHR(13) + CHR(10)
>>
>>= MESSAGEBOX(DIRECTORY("c:\windows"))
>>
>>m.ltTime = DATETIME()
>>
>>_cliptext = ""
>>
>>CREATE CURSOR crsTest (FieldName C(50))
>>
>>m.lcFileName = SYS(2000,'c:\windows\*.exe')
>>
>>DO WHILE NOT EMPTY(m.lcFileName)
>>
>> WAIT WINDOW NOWAIT m.lcFileName
>>
>> UPPER(m.lcFileName)
>> _cliptext = _cliptext + m.lcFileName + CRLF
>> INSERT INTO crsTest VALUES (m.lcFileName)
>>
>>*!* NOTE! Notice the 1 here..for get the "next" record that matches.
>>
>> m.lcFileName = SYS(2000,'c:\windows\*.exe', 1)
>>
>>ENDDO
>>
>>= MESSAGEBOX("Execution Time = " + STR((DATETIME() - m.ltTime)))
>>= MESSAGEBOX("Record Count = " + STR(RECCOUNT('crsTest')))
>>
>>
>>
>>>What do you think should I do to fix the situation?
>>
>>Try running the above code and tell me if it works, please.
>>
>>>One of the ideas is to create a list of all jpg and tif files in the directory at night
>>>and use this list from the application. We need to have a directory monitor for this approach
>>>since new files may be added during the day... It's achievable in VFP9 and documented in solution/samples...
>>
>>I guess you could do a cron-type thing, getting all of the new files for today or
>>something. (Shrug.)
>>
>>Regards,
>>
>>Randall