在 Windows 批处理文件中返回值的命令?

Moh*_*deh 4 windows command-line-interface

如何在 Windows 批处理文件中返回值?我可以在 Unix 中使用,exit 1但如何在 Windows 中执行此操作?

use*_*517 6

在 Windows 批处理文件中将值返回给命令外壳使用

exit /b yourexitcode
Run Code Online (Sandbox Code Playgroud)

例如

exit /b 3
Run Code Online (Sandbox Code Playgroud)

将返回 3 in %ERRORLEVEL%