开发者

How to remove double quotes from a variable in a batch file?

开发者 https://www.devze.com 2023-01-18 17:16 出处:网络
var may be double quoted: set var=\"Very long text\" or without quotes: set var=Some开发者_开发百科_Text

var may be double quoted:

    set var="Very long text" 

or without quotes:

    set var=Some开发者_开发百科_Text

I would like to get the unquoted text, i.e. Very long text in the first case and Some_Text in the second one.

How could I remove the double quotes, if exist ?


Have you tried this method?

See also: http://ss64.com/nt/syntax-esc.html

0

精彩评论

暂无评论...
验证码 换一张
取 消