It sounds like your files aren't being closed properly (which is why your "fopen" -> "fprint" -> "fclose" loop didn't hit the problem, since it's simple and fclose is getting called correctly every time). Last time I had this problem it was because the script was hitting some case inside the code where it'd skip or error…
Hmm ok. I was pretty sure that the only case where fclose wouldn't get called was if fopen returned 0 (could not open) in this script... I'll have a look again to make sure and come back with the findings. That would be embarassing if that's what it was... Thanks for the help, this has been driving me mad :P
Im running into this issue and was wondering if anyone else had encountered it. Basically I have bit of mel script thats batch processing a load of maya files and writing data to text files. After around 180 files I get a warning saying Internal file descriptor table is full and the next time fopen is called after…