Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADIR, SYS(2000) and Filer all returned wrong results
Message
 
 
To
01/12/2006 09:47:54
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:
01173982
Message ID:
01174097
Views:
25
>Putting many files into one directory can slow down your system, espoecially if you happen to click on the directory with explorer. Here is a comment I wrote earlier to someone with a related problem:
>
>I would say that storing the pictures as separate files would be the best solution. Personally I store about 6 million pictures in a directory tree, and all the pictures have numeric, 8 digits, names. I have created 9 directories named 1 to 9, and each directory has 10 subdirectories, named 0 to 9. So picture 12345678.jpg goes into directory 1\2, picture 34567890.gif goes into 3\4 and so on. Dividing the pictures into several subdirectories is significantly faster than storing them all in one directory. In my table, I have one C(8) field for the picture names, the extension I find programmatically. I have made a simple User Defined Function to find the path to the pictories.

That sounds reasonable. Perhaps we can also divide the files somehow alphabetically. But unfortunately it would mean a system re-design. We can not just keep pictures with the file, AFAIK. I'm not really sure of all the reasons behind the scenes, but I was presented originally with a task to find why the code returns a wrong picture. I tried to look at the old code, but it was written in such a way, that make any possibility of understanding it extremely difficult. So, I asked my manager to explain me in English what the program was doing and re-designed it from scratch.

Yesterday he asked me to look into Invalid Subscript reference problem and also add few new non-standard cases. While doing so, I discovered this bug.

So, for now I switched to sys(2000) solution looking for a mask and added a check within DO while loop for the mask indeed in the file.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform