Files
Sun1602/Server/_bin/util/WorldServerConvert.cmd
T
2022-10-26 12:25:11 +08:00

68 lines
919 B
Batchfile

@echo off
setlocal
@echo.
@echo.
@echo.
set Flag=1
set Path="..\"
set Now="WorldServer.exe"
set New="WorldServerNew.exe"
set Old="WorldServerOld.exe"
goto START
:DEBUG
set Flag=0
set Path="..\"
set Now="WorldServer_d.exe"
set New="WorldServerNew_d.exe"
set Old="WorldServerOld_d.exe"
goto START
:START
if not exist %Path%%Now% goto ERR1
if not exist %Path%%New% (
if not exist %Path%%Old% goto ERR2
)
if exist %Path%%New% (
if exist %Path%%Old% (
del /F/S/Q %Old%
)
)
if exist %Path%%Old% (
rename %Path%%Now% %New%
rename %Path%%Old% %Now%
@echo%Old% 기존 버전 복구
) else (
rename %Path%%Now% %Old%
rename %Path%%New% %Now%
@echo%New% 새 버전 적용
)
if %Flag% == 0 (goto END) else (goto DEBUG)
:ERR1
@echo%Now% file not found
if %Flag% == 0 (goto END) else (goto DEBUG)
:ERR2
@echo%New% AND %Old% file Not found
if %Flag% == 0 (goto END) else (goto DEBUG)
:END
@echo.
@echo.
pause