Hey guys I have a directory with 31998 folders in it, when I try and make a new dir I get the following error, "mkdir: cannot create directory `test': Too many links" is there any way around this?

The folders are essently numbered 0 - 31997 (and then onward if I could have more folders). Anyone got any ideas for a better dir structure if there is no way around the folder limit?

EDIT: Oh ya I am using ext3