Save Game Backup Batch File
JudgeRhadamanthus
The Internet Join Date: 2015-10-01 Member: 208246Members
I play Hardcore. I die, I restart. But sometimes, as this is pre-release, the game bugs and in hardcore mode than often not this means I lose everything. So I like to back up my saves. I Only use these backups if the save gets bugged. I am quite well disciplined.
So here is a handy Batch File for backing up your saves but not overwriting the last backup. It’s designed for robocopy on a windows 8 or 10 machine.
What it does is copy the save from slot 0000 to a location you specify. You’ll need to edit the batch file, which is damn easy. It looks in the location you back up to, counts the folders and adds a new one and copies your save to it. I did it this way so I had a series of saves. This allows me after a patch to pick my level of progress to start with in the new patch.
It’s not hugely clever and has no error handling. But it gets the job done.
To set it up :
1. Just create a new Bat file.
2. Paste in the code below.
3. Every time you see this "D:\Games\Save Backups\Subnautica\Cyclops Game 0\" change it to where you want to save a
backup to.
4. "G:\Steam\steamapps\common\Subnautica\SNAppData\SavedGames\slot0000" is where the save file is. Change if
needed.
5. Watch the space. The Subnautica saves are large.
6. Make sure to keep the “ and ( and \ symbols where they are.
cd /d "D:\Games\Save Backups\Subnautica\Cyclops Game 0\"
@echo off
setlocal enabledelayedexpansion
set count=1
for /d %%a in ("D:\Games\Save Backups\Subnautica\Cyclops Game 0\*") do set /a count+=1
echo %count%
set folname=slot000!count!
echo folder name !folname!
if not exist "!folname!" (
echo Folder !folname! does not exist, creating
robocopy "G:\Steam\steamapps\common\Subnautica\SNAppData\SavedGames\slot0000" "D:\Games\Save Backups\Subnautica\Cyclops Game 0\!folname!" /e
) else (
echo Folder !folname! exists
)
echo Finished
pause
So here is a handy Batch File for backing up your saves but not overwriting the last backup. It’s designed for robocopy on a windows 8 or 10 machine.
What it does is copy the save from slot 0000 to a location you specify. You’ll need to edit the batch file, which is damn easy. It looks in the location you back up to, counts the folders and adds a new one and copies your save to it. I did it this way so I had a series of saves. This allows me after a patch to pick my level of progress to start with in the new patch.
It’s not hugely clever and has no error handling. But it gets the job done.
To set it up :
1. Just create a new Bat file.
2. Paste in the code below.
3. Every time you see this "D:\Games\Save Backups\Subnautica\Cyclops Game 0\" change it to where you want to save a
backup to.
4. "G:\Steam\steamapps\common\Subnautica\SNAppData\SavedGames\slot0000" is where the save file is. Change if
needed.
5. Watch the space. The Subnautica saves are large.
6. Make sure to keep the “ and ( and \ symbols where they are.
cd /d "D:\Games\Save Backups\Subnautica\Cyclops Game 0\"
@echo off
setlocal enabledelayedexpansion
set count=1
for /d %%a in ("D:\Games\Save Backups\Subnautica\Cyclops Game 0\*") do set /a count+=1
echo %count%
set folname=slot000!count!
echo folder name !folname!
if not exist "!folname!" (
echo Folder !folname! does not exist, creating
robocopy "G:\Steam\steamapps\common\Subnautica\SNAppData\SavedGames\slot0000" "D:\Games\Save Backups\Subnautica\Cyclops Game 0\!folname!" /e
) else (
echo Folder !folname! exists
)
echo Finished
pause
Comments
Added complexity. Trying to keep code transparent to all user levels
You are right, but how many people know what a variable is, or a zero based array or the pro-cons of a while vs if loop? Trying to be a simple as I can here.