【发布时间】:2014-03-13 00:10:12
【问题描述】:
我用:
FOR /F "delims=" %%G IN ("%command%") DO SET command=%%~G
从变量 %command% 中删除 "" 引号。如果 command = "Shutdown /s /t 00",则在此行之后将是:Shutdown /s /t 00。它有效。
但是当命令包含一个等号 (=) 的字符串时,它也会删除这个字符。示例:
之前,命令 = "D:\temp\stinger --ADL --GO --Silent --ReportPath= D:\temp --ReportOnly --Delete --Program"
之后, command= D:\temp\stinger --ADL --GO --Silent --ReportPath D:\temp --ReportOnly --Delete --Program
看,引号“”被删除了,还有符号=。
那么,如何在不删除等号的情况下删除引号“”。
谢谢
【问题讨论】:
标签: windows batch-file