0

I'm working with software that can potentially open upto 5,000 files simultaneously. (Perhaps the software is flawed to do that, but its what I have to work with and there isn't an alternative). I call the .exe program from a batch file.

Windows 10 maxs out at 509 open files, but I read this can be set to 2048 using the _setmaxstdio() function. I've tried resetting the figure using python code but that didn't work - I think its because the _setmaxstdio() figure is specific to that application that uses it.

I'm thinking maybe if I call it in my batch file it would get me to circa 2048 but...

  • how can I set the _setmaxstdio() in a batch file?
  • would it even work as the batch file calls an .exe?
  • Read [_setmaxstdio max open files is 2048 only?](https://stackoverflow.com/questions/1803552/) and [Is there a limit on number of open files in Windows?](https://stackoverflow.com/questions/870173/) And it is not possible to change with a batch file this process parameter for an executable running in a separate process. It would be interesting how you start the executable. It is possible that the limit comes from maximum command line length limit. And of what type is the executable, console or GUI application? – Mofi Mar 30 '18 at 15:11

1 Answers1

0

Thank you for your response Mofi - it helped me get my answer (eventually...).

As you say, _setmaxstdio is process specific. The answer was to get the source code of the application, add additional code to change the default maximum open value to 2048, then recompile.

I certainly learnt a lot in the process as I'm merely a 'Python scripter'!