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:
01174017
Views:
9
>>>>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
>>>>
>>>
>>>There are 13173 jpg files in that folder and the total time took 30 sec.
>>
>>That seems reasonable for such a long list.
>>
>>You might also consider to divide your files into more folders, to make it more manageable. Even looking at the files in Windows Explorer can take a long time with such a long list.
>>
>>Splitting folders might be convenient even if you were already working with VFP 9, which doesn't have this array limit.
>
>The problem with splitting is How to split? In other words, these images represent different styles. If, say, we split the folder by two without any particular algorithm, then I would have to check two folders in my code. When we decide to add a new folder, I would have to check it as well. This may become more complex than it's worth...


Naomi, make a subfolders in your picture folder and place there no more that 1024 files.
Like:
JPG
  JPG1
  JPG2
  JPG3
Then create a function that will search in [JPG] and use recursion to search in subfolders.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform