Continue batch file from previous point -


i playing alpha game when crashes corrupts saved game, created batch file saved game.

@echo off  :a  rem deletes old backup  rmdir /s /q "backup location 1"  rem creates  xcopy "game location" "backup location 1" /e /i /q /r /y  rem adds time out 300 seconds  timeout /t 300  rem deletes old backup  rmdir /s /q "backup location 2"  rem creates  xcopy "game location" "backup location 2" /e /i /q /r /y  rem adds time out 300 seconds  timeout /t 300   rem repeats   goto 

this works fine stars on first up. want have continue previous point of backing up. created following test file

@echo off set point=a  echo variable "%point%"  if %point%==c (goto :a) if %point%==a (goto :b) if %point%==b (goto :c)   :a echo set point=a echo variable "%point%" pause   :b  echo b set point=b echo variable "%point%" pause  :c  echo c set point=c echo variable "%point%" pause 

when file restarted point variable same.

is possible have set point= save variable file next time run?

can please explain code suggested, can use google research myself , better understanding. if complicated may not know looking @ google it.

thank help

in versions of dos can use /p argument on set command load contents of file variable.

set /p point=<a.txt 

where a.txt contains value want set "point" variable to.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -