How can I add greater than and less than into a batch file variable

后端 未结 3 1570
忘了有多久
忘了有多久 2020-12-02 02:09

When I try

@echo off
set PTag=^
echo %PTag%

I get nothing.

Now what\'s interesting is that if there\'s an empty line aft

3条回答
  •  Happy的楠姐
    2020-12-02 02:45

    Just use Delayed Expansion when you show the variable value:

    @echo off
    setlocal EnableDelayedExpansion
    
    set "PTag=
    " echo !PTag!

提交回复
热议问题