I'm a little curious how many variables I can set in a batch file.
I have a little script here
@ECHO OFF
SETLOCAL EnableDelayedExpansion
FOR /L %%P IN (1,1,2147483647) DO (
SET Foo[%%P]=%%P
ECHO !Foo[%%P]!
)
But this script will work forever. So, is there a way to find out the limit on the number of variables? (and, of course, how many variables can be used in a batch file.)
EDIT:
Since the comment below says that var. The amount may vary depending on different OS. Therefore, if you answer, use Windows 7 64bit w/ 4 GB RAMas a guide.
Any help would be appreciated!
source
share