No Man's Sky

No Man's Sky

View Stats:
Trance Aug 14, 2018 @ 2:10pm
1
[CMD-BATCHFILE] Simple Timed Auto-Backup Of Save-Games
HI!

This will create folders named by date and time and copy the save-game-files there repeatedly after as many seconds as you like.
This will not copy the cache folder, only the required save-game-files.

I can not test this with Windows 7 or 8, it should work, this works with Windows 10

- create a folder where the save-games will be copied to
- create a textfile, name it as you like, e.g. NMSsaveBU, change the extension from .txt to .cmd (NMSsaveBU.cmd) (if you have extensions hidden, enable them in the explorer settings)
- fill the file with this text:

cd saveBUsPath :loop set folder="%date%_%time:~0,2%-%time:~3,2%-%time:~6,2%" mkdir %folder% copy C:\Users\YOUR_USERNAME_HERE\AppData\Roaming\HelloGames\NMS\st_76xxxxxxxx %folder% timeout /t 300 /NOBREAK goto loop


and then change:

in line 1:
saveBUsPath
to the absolute path where you want the backups stored OR copy to and run the cmd-file from within that folder (you can then create a link for easy access)

in line 6:
C:\Users\q\AppData\Roaming\HelloGames\NMS\st_x_numbers_x
to the path where your save-games are

in line 7:
the 300 means 300 seconds (5 Minutes) - change it to a number of seconds you want (better more than 59 seconds)

you can experiment with line 4:
folder=%date:~10,4%_%date:~4,2%_%date:~7,2%_%time:~0,2%%time:~3,2%%time:~6,2%
to give the backup folders a style you like more
(results can be different, depending on your time format settings - change the numbers and see what changes (type commands 'date' and 'time' in a cmd-console to see the full output))

((EDIT: when using command-line: it is 'echo %time%' to show time, 'time' alone is for setting the clock. 'echo %date%' works too, it omits the leading text that 'date' shows - the text is different in language settings and this can lead to odd results - I changed it to a general %date% in the code above and should always work))

When running: the window shows the progress and can be closed to exit/stop or if it has focus press CTRL+C

You can minimize the window but remember to close it when you stop gaming!

Remember to delete old backups: if set to 60 there will be a save every minute and 60 folders per hour

I hope you'll find this helpful!
Have fun out there!

Update:
M.Spengler made a nice alternative, watch this:

Originally posted by M.Spengler:
This script waits for NMS to start and terminates if NMS isn`t running anymore.
You could use bat_to_exe converter and start the game from steam by linking it.


set steampath=D:\Games\Steam
set backuplocation=D:\NMS_Backup
set autosavetimer=300

rem ###
"%steampath%\SteamApps\common\No Man's Sky\Binaries\nms.exe"
:wait
tasklist | find /i "NMS.exe" >nul 2>&1
if errorlevel 1 goto wait
echo cache >%temp%\exclude.txt
:autosave
set folder="%backuplocation%\%date%_%time:~0,2%-%time:~3,2%-%time:~6,2%"
tasklist | find /i "NMS.exe" >nul 2>&1
if not errorlevel 1 (
xcopy %appdata%\HelloGames\NMS\* %folder% /i /s /exclude:%temp%\exclude.txt
timeout /t %autosavetimer% /nobreak
goto autosave
) else (
exit
)
Last edited by Trance; Aug 25, 2018 @ 12:00pm
< >
Showing 1-15 of 33 comments
GraShropp Aug 14, 2018 @ 2:13pm 
Nice !!
Gamerfss86 Aug 14, 2018 @ 2:16pm 
nice man thanks for taking the time to do this for the communtiy
Trance Aug 14, 2018 @ 2:23pm 
YW! Thanks!
I love this game and if I can help others to have a better time with it - it's a pleasure.
(Or less bad times ;) in fact it's more like a saftey-net for rlly bad times)
I always wanted to save one's life! This is my chance =D

GrandTickler Aug 14, 2018 @ 2:32pm 
thanks, works like a charm
Trance Aug 14, 2018 @ 3:07pm 
I made a small fix - there was a bug when time starts with 0
check line 3
I added "" 's and made the format easier to read
Shame on you Aug 16, 2018 @ 9:46am 
Hey really nice

Thank you for sharing
Shame on you Aug 16, 2018 @ 1:50pm 
I am not really firm with batch files
How can i change it so that i start the game with the same batch file too ?
(would reduce the chance to forget to start the batch file)
Trance Aug 16, 2018 @ 2:32pm 
Hey! :steamhappy:
type at the very first new line:
start steam://rungameid/275850

And maybe this is interesting for you: I have created another solution, that will create a save-backup with a key-combo from in-game. Look here:
https://steamcommunity.com/sharedfiles/filedetails/?id=1480189550
it's little more complex. If you decide to use it you can edit the same first-line to it.(NO, do not write that line to the cmd file in the other solution! This would try to start the game each time! mybad :gs_stomped:)

EDIT: Oh, nice! I didn't know steam shows a preview to some steam-links.
Last edited by Trance; Aug 16, 2018 @ 2:38pm
Malasuerte Aug 16, 2018 @ 3:05pm 
It's not working for me. It creates the folders but they are empty
GrandTickler Aug 16, 2018 @ 4:50pm 
Originally posted by Malasuerte:
It's not working for me. It creates the folders but they are empty
yea i noticed the same, theres a couple backup folders with files in them, but it created a ton of empty ones as well
Trance Aug 16, 2018 @ 10:09pm 
pls check if you have copied or edited the file correctly
or post it here (or PM it to me), and I'll check it for errors

I can only guess that you missed the " " around (required if spaces are in the filename/path. %time% and %date% can _sometimes_ have spaces, depending on current date/time)

EDIT: I fixed that in the example above, maybe you copied it before I fxed that ( 3 days ago)
Last edited by Trance; Aug 16, 2018 @ 10:41pm
GrandTickler Aug 16, 2018 @ 11:03pm 
Originally posted by Trance:
EDIT: I fixed that in the example above, maybe you copied it before I fxed that ( 3 days ago)
yeah that would be the case, thanks
Malasuerte Aug 17, 2018 @ 5:36am 
I fixed it. It was a language issue. My system is in spanish so I see the folder Users as Usuarios. and, although I see it in spanish in the windows explorer, windows internally still handles it as Users. I simply used Users instead of Usuarios in the batch file and it immediately recognized the path.

It is working correctly now. I will keep doing test. Thanks a lot
Gamerfss86 Aug 17, 2018 @ 8:25pm 
hey man you should put this on nexusmods.com so many many people can find this.

this is super helpful for not just a griefer net. but save scuming other stuff (like geting seeds for a ship but dont want to own it) after buying it getting the seed then getting the backup save.

or the same with a freighter

hope this helps
Stormshado Aug 25, 2018 @ 2:40am 
FYI, you can replace
C:\Users\YOUR_USERNAME_HERE\AppData\Roaming
with the windows variable
%appdata%
< >
Showing 1-15 of 33 comments
Per page: 1530 50

Date Posted: Aug 14, 2018 @ 2:10pm
Posts: 33