Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM I saw a paste that needed saving and loading, so I decided to put this up :D
- @echo off
- cls
- goto misc
- :misc
- cls
- set /a data+=1500
- goto menu
- :menu
- cls
- echo Data saving test
- echo Data amount: %data%
- echo Press S to save, Press D to load, press F to reduce data amount & echo ,press I to increase save amount and press C to delete & echo your save file.
- choice /c SDFIC /n
- if %errorlevel%==1 goto save1
- if %errorlevel%==2 goto load
- if %errorlevel%==3 set /a data-=100 & goto menu
- if %errorlevel%==4 set /a data+=100 & goto menu
- if %errorlevel%==5 goto erasefile
- :save1
- cls
- echo Saving...
- timeout /t 1 /nobreak >nul
- goto save2
- :save2
- cls
- echo ::File auto generated at %time% %date% >>SaveData.bat
- cls
- echo set /a data=0 >> SaveData.bat
- cls
- echo set /a data+=%data% >>SaveData.bat
- cls
- goto menu
- :load
- cls
- if not exist SaveData.bat cls & echo No save data has been saved. & timeout /t 1 /nobreak >nul & goto menu
- cls
- if exist SaveData.bat call SaveData.bat
- cls
- echo File loaded! & timeout /t 1 /nobreak >nul & goto menu
- :erasefile
- if exist SaveData.bat del SaveData.bat & cls & echo Save file deleted. & timeout /t 1 /nobreak >nul & goto menu
- if not exist SaveData.bat cls & echo No save file to delete. & timeout /t 1 /nobreak >nul & goto menu
Advertisement
Add Comment
Please, Sign In to add comment