为什么将CMD开头的参数用引号引起来会导致其行为有所不同? [英] Why does wrapping an argument to CMD's start in quotes cause it to behave differently?
本文介绍了为什么将CMD开头的参数用引号引起来会导致其行为有所不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这只花了我很多时间在批处理脚本中进行调试:
This just took up a good chunk of my time to debug in a batch script:
:: Opens up Chrome
start C:\cygwin64\home\james\code\cs\PolynomialReducer\reports\PolynomialReducer.Tests\index.htm
:: Opens a new command prompt
start "C:\cygwin64\home\james\code\cs\PolynomialReducer\reports\PolynomialReducer.Tests\index.htm"
为什么/如果将参数用引号引起来, start
命令的行为有何不同?
Why/is there any reason the start
command behaves differently if you wrap your argument in quotes?
推荐答案
第一个引用的参数假定为窗口标题.如果在 start
和带引号的命令之间插入一组空引号,则应遵守预期的行为.
The first quoted argument is assumed to be a window title. If you insert an empty set of quotes between start
and the quoted command, you should observe expected behaviour.
这篇关于为什么将CMD开头的参数用引号引起来会导致其行为有所不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文