`

window 批处理 bat

 
阅读更多
rem does not display cmd("rem" and no "rem")
echo off 
rem @echo off "@" <==> "echo off", "@"'scope is signle line.
rem write result of "dir" to a.txt
rem dir c:\*.* >a.txt 
rem call another "bat", after run over, go on execute itself.
rem call c:\ucdos\ucdos.bat
rem pause
rem %0-%9,"bat" can receive 10 parameters. eg: a.bat a
rem format %1
rem "%~dp0" is current dir
echo %~dp0 
set BASEDIR=%~dp0\..
rem echo %PATH%
rem start calc.exe
if exist "%BASEDIR%"\bin\mc-config-env.bat call "%BASEDIR%"\bin\mc-config-env.bat
if ERRORLEVEL 1 goto error
net start %SERVICE_NAME%
:error
set ERROR_CODE=1
exit /B %ERROR_CODE%

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics