您可以分支%1的值.例如,一种方法是这样做
if "%1"=="" goto bad :good rem Do processing here goto end :bad rem Do error handling here :end
if "%1"=="" goto bad :good rem Do processing here goto end :bad rem Do error handling here :end