我在一个foreach循环中工作,并试图将我的array_rand放在一个if语句中。它不会在if语句中工作,但是如果我将它从if语句中取出来,它就会工作。不管我是在循环之前还是之后放置它,它都不会在if语句中工作。但是,如果我将循环从if语句中提取出来,那么它将在循环之前或之后工作。orange","white","silver","purple","pink");
if
set /p dir=Specify Path: echo ok echo not ok如果用户输入像%userprofile%这样的路径或变量当使用%dir%时,%userprofile%不会在.call echo %dir% :: this does expandcall cd %dir% :: expands
但是我如何让路径在if语句中展开
我正在尝试根据if条件更改变量的设置。用户选择一个时间,根据他们选择的时间,变量“时间”会发生变化。我收到错误"A end of line can‘t go after this“”。name "Cancel" default items {"12 am"}
set time equal to "0"
else