0
我想要一個可以查看'set是否存在的代碼。BATCH「設置」命令問題
例子:
@echo of
// Now the thing i want:
if not exist "%user%" (
goto :Register
)
:login
call Functions\user.bat
echo Hello %user%!
pause
:register
echo Register..
pause
現在怎麼讓我的批處理文件,以檢查是否存在與否%用戶%。 %用戶%不是我腳本btw中的文件夾。
這個問題對我來說還不清楚。批次中沒有任何設置命令。如果您想知道是否設置了var,請使用'if defined varname'參見[ss64.com/nt/Set](http://ss64.com/nt/set.html)和[ss64.com/nt/if ](http://ss64.com/nt/if.html) – LotPings