[英]How to remove double quotes from a variable in a batch file?
var
may be double quoted: var
可以双引号:
set var="Very long text"
or without quotes: 或没有引号:
set var=Some_Text
I would like to get the unquoted text, ie Very long text
in the first case and Some_Text
in the second one. 我想得到未加引号的文本,即第一种情况下的
Very long text
和Some_Text
情况下的Some_Text
。
How could I remove the double quotes, if exist ? 如果存在,我怎么能删除双引号?
Have you tried this method ? 你试过这种方法吗?
See also: http://ss64.com/nt/syntax-esc.html 另见: http : //ss64.com/nt/syntax-esc.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.