Batch file 如何在一定程度上逃逸每个角色?
情况:Batch file 如何在一定程度上逃逸每个角色?,batch-file,command-line,Batch File,Command Line,情况: set command=echo File used by cleaning executable ^>^> dummyfile %command% 我希望一个变量包含一个命令,以便执行该命令: %command% 尝试: set command=echo File used by cleaning executable ^>^> dummyfile %command% 这是可行的,但是我必须为每个命令做特定的编辑。。。 在=符号之后是否有一些东西将全部用作
set command=echo File used by cleaning executable ^>^> dummyfile
%command%
我希望一个变量包含一个命令,以便执行该命令:
%command%
尝试:
set command=echo File used by cleaning executable ^>^> dummyfile
%command%
这是可行的,但是我必须为每个命令做特定的编辑。。。
在=符号之后是否有一些东西将全部用作引号
set command="echo File used by cleaning executable >> dummyfile"
%command%
然后,由于引号,命令无法识别您对引号的想法并没有那么糟糕:
set "command=echo File used by cleaning executable >> dummyfile"