@echo off set strA= set strB=bat if "%strA%" equ "" ( echo null ) else ( echo not null ) if "%strB%" equ "" ( echo null ) else ( echo not null ) pause复制代码