>>True, for ADIR it may not be such a good solution due to the 64K elements limitation of arrays. It's amazing how fast the number of files in a folder "mushrooms" out of control, isn't it! I have some systems with 2 or 3 hundred K files on them (not all in one folder), and I know what each and every one of those files are for/do. (Yeah, right!)
>
>The worst I've seen was 1500 files in one directory, and the system was darn slow with that app (other apps which used shorter directories were comparably faster). It was back in DOS 5.0 and, well, we were told that whenever you are opening a file, the DOS searches the directory sequentially. Since then, I'm trying to reduce the number of files my apps use. Now with W9x and NT, I'm not sure anymore - does the OS still search the directory sequentially, or is it finally indexed (I remember VAX VMS had indexed directories 14 years ago)?
Under NT, with NTFS, there's an index; NTFS degrades smoothly as the number of files/directory increases, regardless of whether it's being accessed by NT or Win95 across a network. With both NT and Win95, FAT directories still use a sequential search, including empty/deleted directory entries, making FAT the least desirable file system for overpopulated directories, as well as when performing non-sequential I/O on files. NetWare caches and hashes its directories, which makes NetWare seem blazingly fast on directory searches.