-
-
Save NKid/d33ba64902c6e2910d7d to your computer and use it in GitHub Desktop.
EnableDelayedExpansion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
REM 啟用延遲環境變量,這樣才能在IF中設定變數 | |
SETLOCAL EnableDelayedExpansion | |
IF 1==1 ( | |
SET str=abc | |
ECHO !str! | |
) | |
ENDLOCAL | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment