Count Arguments to a DOS Batch File without Using Your Fingers and Toes

来源:互联网 发布:gps端口检测 编辑:程序博客网 时间:2024/05/18 00:42
@echo offSETLOCALset argNum=0set expectArgs=3for %%i in (%*) do set /a argNum += 1echo %argNum%if %argNum% NEQ %expectArgs% (echo 参数不正确!)ENDLOCAL