20157 Posts in 3360 Topics - by 6693 Members - Latest Member: Awes597

Author Topic: How to back up your game  (Read 242 times)

GaryP

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to back up your game
« on: July 04, 2017, 01:51:59 PM »
I have a batch program for all my games that I use to back them up.  This works on any game and it's super easy to set up. I wrote this years ago and I still use it.
If you do something stupid in the game, or something goes horribly wrong, you can always load the last save.


First there's my batch command file:

Code: [Select]
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-3 delims=/:/ " %%a in ('time /t') do (set mytime=%%a-%%b-%%c)
set mytime=%mytime: =%
rem echo %mydate%_%mytime%

XCopy %1 %2_%mydate%_%mytime% /E/H/I

I made a text file and renamed it to BackupSaveFile.bat and I placed the code above into it. Then I copied the bat file to the Roaming folder just outside of the Avorion folder.

Next I created a shortcut on my desktop to call this this bat file.

Set it up like this:
Target: C:\Users\Gary\AppData\Roaming\BackupSaveFile.bat "C:\Users\Gary\AppData\Roaming\Avorion\*.*" "D:\Avorion\Saved Games\SaveGame"

Start in: C:\Users\Gary\AppData\Roaming

The target calls BackupSaveFile.bat and passes it 2 parameters; (1) where to find the game files, and (2) where to copy them to.

In my case "C:\Users\Gary\AppData\Roaming\Avorion\*.*" is the game location. (Don't forget the quotes).

And I have a folder on my D drive, but you can make one anywhere.  I called mine SaveGame, and I placed it in a folder called Avorion on my D drive.

You can also make a folder in your My Documents called Avorion Saves, and use that.  Don't forget to change the path in the shortcut.

What this does is make a bunch of files appended with time date so you can go back to any point.

Example:
SaveGame_2017-06-30_01-46-PM
SaveGame_2017-06-30_09-48-AM
SaveGame_2017-07-01_02-06-PM

These are not zipped, so if you need to, you can copy the last save over the current one and all is good.
I can use this for all my games and all I need is a separate shortcut for each game.

I hope this helps someone.

SirJeb

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: How to back up your game
« Reply #1 on: August 06, 2017, 02:54:39 PM »
This is great, thanks!

I had to do some slight modifications to make it work with my locale (24h clock and DD.MM.YYYY date format):

Code: [Select]
For /f "tokens=1-3 delims=. " %%a in ('date /t') do (set mydate=%%c-%%b-%%a)
For /f "tokens=1-2 delims=/:/ " %%a in ('time /t') do (set mytime=%%a-%%b)
set mytime=%mytime: =%
rem echo %mydate%--%mytime%

XCopy %1 %2%mydate%--%mytime% /E/H/I