在xp的批处理文件行长度限制? [英] Line length limit in xp batch file?

查看:125
本文介绍了在xp的批处理文件行长度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在.bat文件运行长的命令(比如300个字符长度)

When running long command in .bat file (say 300 characters length)

例如:

Some_exe "C:/Documents and Settings/Some user/Some folder1/Some folder2/Some folder3/Some folder4 ... -Some_exe_arg1="arg 1 name" -Some_exe_arg2="arg 2 name" -Some_exe_arg3="arg 3 name"  

有没有上线大小的CMD.exe可以处理的限制?
我应该用.CMD或.bat?
请问有什么办法可以克服这个限制?

Is there a limit on the line size CMD.exe can process? Should i use .CMD or .BAT? Is there any way i can overcome this limitation?

感谢您!

推荐答案

最小的最大一批线路长度为8191字节!

The minimum of the maximum batch line length is 8191 bytes!

这意味着,一条线可以是在任何情况下8191个字节长,但​​它也可以创建具有几乎无限的长度合法批量行

This means that a line can be in any case 8191 bytes long, but it is also possible to create legal batch lines with nearly unlimited length.

样品

echo Longline with 8191 characters.........

set "var=a"
echo UltraLongLine %var:4000chars=% %var:4000chars=% %var:4000chars=% %var:4000chars=%

echo Test <8000Chars <8000chars <8000chars .... <nul

问题的关键就在这里,所有线路都小于8192字节长的解析后,

The point is here, that all lines are less than 8192 bytes long after parsing

这篇关于在xp的批处理文件行长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆