in reply to how to write < 10K files to folder

When dealing with quantities of this amount, you probably want to know the behaviors of your file system.

To continue on kennethk's post, you should also make a decision based on your type of file system. 10K files can be too many files for a standard UFS file system to stand up to (because of needing to read more blocks for a directory than can be handled by a single read). One email processing system uses a directory size of 23 (IIRC) to increase its performance because of this. In the case of 1 million files, you would need to go 4 directories deep to handle 1,000,000 files in a small number of reads.

See Re: Efficient processing of large directory and Unix_File_System for more information.

--MidLifeXis