How do you suppress environment variable expansion within DOS and Windows CMD?

后端 未结 2 779
借酒劲吻你
借酒劲吻你 2020-12-11 04:07

This is a simplified example with modified variable names of what I want to do. Also for simplicity sake, I am showing the command line version rather than the bat file ver

2条回答
  •  难免孤独
    2020-12-11 04:54

    in a batch file, echo %%foo%% will generate %foo%.

    c:\01Temp>type foo.bat
    @echo %%foo%%
    
    c:\01Temp>foo
    %foo%
    
    c:\01Temp>
    

提交回复
热议问题