Automatically backup your save

Tips, tactics, and general discussion for Evochron Legacy.
Ykses
Ensign
Ensign
Posts: 31
Joined: Wed Apr 27, 2011 12:02 pm
Location: France

Automatically backup your save

Post by Ykses »

Hello all...


In the idea that it is important to often backup your progress (game save), I use a little batch file to launch Evochron.
This ".bat" automatically backup your Profiles and Map Logs (located in the "C:\\sw3dg\\EvochronMercenary" folder) in a folder you want, then the game is launched.

Simply copy/paste this code in a text file, then rename the file with the ".bat" file extension instead of ".txt"
@echo off

xcopy /y "C:\\sw3dg\\EvochronMercenary\\pilot*" "Your\\Backup\\Folder\"
xcopy /y "C:\\sw3dg\\EvochronMercenary\\maplog*" "Your\\Backup\\Folder\"
cd /d "Your\\Game\\Folder"
start EvochronMercenary.exe

exit
Replace green text by your own path (the whole path, drive letter included).
IMPORTANT : don't forget the quotation marks ! Just replace the green text.


Like any file, you can create a shortcut on your desktop, and change the icon of the shortcut (then take the default Evochron big_icon in Evochron folder) ;)

=> Old backup files will be overwrited each time you launch the game (no need to confirm the copy, the /y attribute in the xcopy command is here for that).
=> Game save files will not be moved or deleted (of course) ! They're just copied to your backup folder, that's all.
=> Sometimes you can alslo (manually) backup all the save files (in C:\\sw3dg\\EvochronMercenary folder) to keep a trace of your keyboard mapping or game options.



Hope it can help :)



Update 1 : if MS-DOS is not installed on your computer, change your computer :D
...or you can also download it here (thx to Marvin for advice) :
=> http://www.microsoft.com/downloads/en/d ... aac771295f

Update 2 : the script no longer need to be in your game folder. It can now launch the game from anywhere (thx to Akrion Xxarr for the tip) ;)






[Edited on 23-5-11 by Ykses]

[Edited on 24-5-11 by Ykses]
.XS.
User avatar
Marvin
Global Moderator
Global Moderator
Posts: 13936
Joined: Wed Mar 04, 2009 5:47 am
Location: Fallon-Reno

Automatically backup your save

Post by Marvin »

:cool: Keep in mind that some computers don't come with DOS anymore ... but you can DL it from Microsoft.
Ykses
Ensign
Ensign
Posts: 31
Joined: Wed Apr 27, 2011 12:02 pm
Location: France

Automatically backup your save

Post by Ykses »

Yep... thanks for advice Marvin.

Post updated :)

[Edited on 22-5-11 by Ykses]
.XS.
Ykses
Ensign
Ensign
Posts: 31
Joined: Wed Apr 27, 2011 12:02 pm
Location: France

Automatically backup your save

Post by Ykses »

Code updated (in first post) !

Old script copied all the save folder, but finaly no need... it now just copy Profiles and Map Logs ;)

( I'll have to think before, sorry )
.XS.
Akrion Xxarr
Ensign
Ensign
Posts: 10
Joined: Fri May 13, 2011 1:04 am

Automatically backup your save

Post by Akrion Xxarr »

From post: 107602, Topic: tid=7602, author=Marvin wrote::cool: Keep in mind that some computers don't come with DOS anymore ... but you can DL it from Microsoft.
Could you describe to me exactly what computer with a Windows OS doesn't come with a command prompt? I've never heard of that before. It's standard with any version of Windows as far as I'm aware, and it most definitely comes with any version of Windows XP, Vista and 7.

A batch file should run perfectly fine for anybody that can run Evochron Mercenary, no downloading required.

Anyway..
Ykses, you can construct a batch file that doesn't need to be in the game folder.

You can do this, for example:
cd /d "C:\\Your\\Game\\Folder"
start EvochronMercenary.exe

Also, I suggest wrapping your file paths in quotation marks. That should solve any issue with spaces.

Otherwise it's a nice and clean batch file. :) Good job with it.

[Edited on 5-23-2011 by Akrion Xxarr]
User avatar
Marvin
Global Moderator
Global Moderator
Posts: 13936
Joined: Wed Mar 04, 2009 5:47 am
Location: Fallon-Reno

Automatically backup your save

Post by Marvin »

:cool: The game machine my son built for me a looooong time ago ... I tried to run the "edit" command and it didn't work. Turned out, DOS wasn't loaded. So I installed both DOS and BASIC, giving me that old "Windows 3.1" feeling.
49rTbird
Captain
Captain
Posts: 2959
Joined: Sun Oct 28, 2007 10:57 pm
Location: Pinole,Ca,USA,Earth,Orion Spur,Milkyway, Etc.

Automatically backup your save

Post by 49rTbird »

My Win7 pro machines have a command prompt but do not understand old dos commands that I am use to (it was a long time before I would do windows :)) and won't let me do lots of old dos.:P
Explore! Explore! Explore! \"There is no going back (Yet) so Make Today Count!
Ykses
Ensign
Ensign
Posts: 31
Joined: Wed Apr 27, 2011 12:02 pm
Location: France

Automatically backup your save

Post by Ykses »

From post: 107619, Topic: tid=7602, author=Akrion Xxarr wrote:Ykses, you can construct a batch file that doesn't need to be in the game folder.
Also, I suggest wrapping your file paths in quotation marks. That should solve any issue with spaces.
Many thanks for the tip :)

1st post updated !
.XS.
Akrion Xxarr
Ensign
Ensign
Posts: 10
Joined: Fri May 13, 2011 1:04 am

Automatically backup your save

Post by Akrion Xxarr »

From post: 107625, Topic: tid=7602, author=thetiebers wrote:My Win7 pro machines have a command prompt but do not understand old dos commands that I am use to (it was a long time before I would do windows :)) and won't let me do lots of old dos.:P
I'll give you that. It's not a full DOS OS. But most deprecated commands will typically be deprecated for a reason, in that either you'll have little use for them in a current Windows machine, or getting them to work might be inadvisable to use with the Windows OS.

Either way, Ykses is using commands that should be available to any command prompt.


Ykses: I'd also wrap your source path in quotes as well:
xcopy /y "C:\\sw3dg\\EvochronMercenary\\pilot*" "\\Your\\Backup\\Directory"

Quotes tell the command line to take the whole thing as a string. Otherwise it takes everything up to the first space as a string, and assumes what comes after the space is a separate argument.

In most cases, the quotes may not be necessary as there aren't any spaces in the file path to the save files, but it's always good to account for the unexpected, even if it's very unlikely to happen.
MMaggio
Captain
Captain
Posts: 1542
Joined: Tue Jul 29, 2003 1:56 pm
Location: Jupiter, Fl

Automatically backup your save

Post by MMaggio »

Spoken like a true DOS user! ;)
\"To kill hubris with humility is a goal rarely achieved by men\"
User avatar
Marvin
Global Moderator
Global Moderator
Posts: 13936
Joined: Wed Mar 04, 2009 5:47 am
Location: Fallon-Reno

Automatically backup your save

Post by Marvin »

:cool: Good ol' DOS ... wish I'd kept my manuals. Now I gotta check the Web for commands long forgotten.
Akrion Xxarr
Ensign
Ensign
Posts: 10
Joined: Fri May 13, 2011 1:04 am

Automatically backup your save

Post by Akrion Xxarr »

From post: 107634, Topic: tid=7602, author=MMaggio wrote:Spoken like a true DOS user! ;)
I can't claim to know DOS very well, as I've never really worked with a true DOS operating system. So my words just come from being a programmer. Though, in some cases you may as well be a programmer to use a full DOS operating system. ;) I do, however, use the command prompt frequently (Made a moderately complex console based ASCII game engine, for example).

Ultimately, I just treat everything computer related with a good respect to Murphy's Law. xD

[Edited on 5-24-2011 by Akrion Xxarr]
Ykses
Ensign
Ensign
Posts: 31
Joined: Wed Apr 27, 2011 12:02 pm
Location: France

Automatically backup your save

Post by Ykses »

From post: 107631, Topic: tid=7602, author=Akrion Xxarr wrote:Ykses: I'd also wrap your source path in quotes...
You're right :)

I think the save folder path will not changed in future, but we cant be sure... so the best way is to anticipate and wrap all pathes in quotes.

Script updated !
Thx for all your advices Akrion ;)
.XS.