What is the length limit for operating system commands that can be executed using the functions DOS, UNIX, SYSTEM or the bang (!) operator?
1 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2009-11-24
编辑: MathWorks Support Team
2021-5-19
I want to know what is maximum length allowable for commands that are passed to the operating system when executing the functions DOS, UNIX, SYSTEM or the bang (!) operator.
采纳的回答
MathWorks Support Team
2021-5-19
编辑:MathWorks Support Team
2021-5-19
The maximum number of characters that you can use to run an external application and pass arguments to it depends on your exact operating system.
The limits for some of the Windows versions are listed below:
- 128 characters:
Microsoft Windows NT Advanced Server 3.1
Microsoft Windows NT Workstation 3.1
- 2046 characters:
Windows NT 4.0
Windows 2000
- 8191 characters:
Windows XP
If you use another Windows version, Linux, Mac or another supported operating system, then consult the documentation that is included with it or try to find the information on the internet using a search engine.
Related information can be found here:
Command prompt (Cmd.exe) command-line string limitation
If the command you want to execute exceeds the limit of your Windows system and if the cause are long file or folder paths, you may use the DOS functions "subst" or "net use" as a possible workaround.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!