Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Savegame Backup Batch  (Read 853 times)

AlanL

  • Bay Watcher
    • View Profile
Savegame Backup Batch
« on: July 08, 2007, 03:59:00 pm »

I got the infamous inflate -3 error, and it of course wasn't pleasant... so what I did was make a couple of simple batch files to automatically back up region 1 (it only works right if there is ONLY a region 1) to a save folder in the main directory and if need be, restore using the backup. It's so far saved me from 1 inflate -3 error (recently made, and it really is just a convenience).

Here's the code, make a new batch file and copy it in. These need to be run from your main DF folder.

BakupSave.bat

code:

IF NOT EXIST save GOTO EMPTY
ERASE save
ERASE save\region1
RMDIR save\region1
RMDIR save
:EMPTY
MKDIR save
MKDIR save\region1
COPY data\save\region1 save\region1
COPY data\save save

RestoreSave.bat

code:

IF NOT EXIST data\save GOTO EMPTY
ERASE data\save
ERASE data\save\region1
RMDIR data\save\region1
RMDIR data\save
:EMPTY
MKDIR data\save
MKDIR data\save\region1
COPY save\region1 data\save\region1
COPY save data\save

Of course, I haven't tested this hundreds and hundreds of times, so don't yell at me if it somehow messes up your savegames. Keep in mind, it was only meant to be used on savegame folders that only have a region1 region.

[ July 08, 2007: Message edited by: AlanL ]

[ July 08, 2007: Message edited by: AlanL ]

[ July 09, 2007: Message edited by: AlanL ]

Logged