what am i doing wrong (if, errorlevel, ren)
Posted: 13 Jul 2020 04:29
this should be so easy, yet I'm super lost. What am i doing wrong? :S
why is the errorlevel code being 50% ignored?
https://i.postimg.cc/SsCfTgmB/zinger.png
https://i.postimg.cc/5ymq1jYp/Clipboard02f.png
why is the errorlevel code being 50% ignored?
https://i.postimg.cc/SsCfTgmB/zinger.png
https://i.postimg.cc/5ymq1jYp/Clipboard02f.png
Code: Select all
if exist zzzplaces.sqlite ren places.sqlite zpirplaces.sqlite
echo %errorlevel%
::pause
SAME RESULT if not errorlevel 0 goto :ren1 // if errorlevel 0 goto :ren1
if errorlevel 1 goto :ren2
:ren1
ren zzzplaces.sqlite places.sqlite
goto end
::if exist zpirplaces.sqlite ren places.sqlite zzzplaces.sqlite
::if errorlevel 0 goto :ren2
:ren2
ren places.sqlite zzzplaces.sqlite
ren zpirplaces.sqlite places.sqlite
:end
pause