CMD Limits.
--- a/cmd.rst Fri Mar 19 00:17:23 2010 +0200
+++ b/cmd.rst Sun Mar 21 10:25:18 2010 +0200
@@ -47,3 +47,11 @@
$ for /f "tokens=*" %%i in ('%~dp0sometool.exe') do set TOOLOUTPUT=%%i
$ for /f "tokens=1 delims=" %%s in (users.txt) do (echo %%S & command "%%S") >> outputfile.txt
+
+* Limits.
+
+Variable value and one line command string after expansion can not exceed 8191
+characters for Windows XP and later and 2047 for Windows NT, Windows 2000.
+
+ http://support.microsoft.com/default.aspx?scid=kb;en-us;830473
+ Command prompt (Cmd. exe) command-line string limitation