Skip to content

Instantly share code, notes, and snippets.

@mlagerberg
Last active September 10, 2017 22:58
Show Gist options
  • Save mlagerberg/3240389 to your computer and use it in GitHub Desktop.
Save mlagerberg/3240389 to your computer and use it in GitHub Desktop.
[Windows batch script for keeping savegames in sync over Dropbox]
@echo off
set DROPBOX=%HOMEPATH%\Dropbox
cls
echo.
echo This script will create directory junctions between your savegames and Dropbox/Google Drive/Skydrive/Copy/SugarSync/CX/etc,
echo essentially storing your savegames in the cloud.
echo So, make sure you have enough space in your Dropbox account!
echo No Dropbox? Go: http://db.tt/9OTahFS
echo Better yet, use Copy and get many more gigabytes: https://copy.com?r=fxEXmQ
echo.
echo Please edit this file before executing and manually set the correct
echo paths to the savegame folders you want to sync. A few examples are given.
echo.
echo Please finish: "On this computer..."
echo.
echo [A] "... I have savegames I want to copy to Dropbox."
echo [B] "... I have no savegames; I want to use the ones I put on Dropbox earlier."
echo [C] "... I... nevermind! Cancel! Cancel!"
echo.
:choice
SET /P C=[A,B,C]?
if /I "%C%"=="A" goto source
if /I "%C%"=="B" goto target
if /I "%C%"=="C" goto end
goto choice
:source
echo Creating directory junctions to share source files over Dropbox...
REM Edit the following lines to the source directories where your savegames are located:
REM mklink /J "%DROPBOX%\GTA Vice City User Files" "%HOMEPATH%\Documents\GTA Vice City User Files"
REM mklink /J "%DROPBOX%\machinarium" "%HOMEPATH%\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\EBWTTDWK\localhost\Program Files\Machinarium\machinarium.exe"
REM mklink /J "%DROPBOX%\monkeyisland1" "%HOMEPATH%\Documents\Telltale Games\tales of monkey island - chapter 1"
echo Done!
goto end
:target
echo Creating directory junctions from shared files on Dropbox...
REM Edit the following lines to the source directories where your savegames are located:
REM mklink /J "%HOMEPATH%\Documents\GTA Vice City User Files" "%DROPBOX%\GTA Vice City User Files"
REM mklink /J "%HOMEPATH%\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\EBWTTDWK\localhost\Program Files\Machinarium\machinarium.exe" "%DROPBOX%\machinarium"
REM mklink /J "%HOMEPATH%\Documents\Telltale Games\tales of monkey island - chapter 1" "%DROPBOX%\monkeyisland1"
echo Done!
goto end
:end
echo Bye.
@mlagerberg
Copy link
Author

Syncing savegames over Dropbox

This batch file will create directory junctions between your savegames and Dropbox, allowing you to share savegames across multiple computers. To sync a game, find out where the savegames are stored (Google is your friend) and add two lines to the file.

To link the samegame folder to Dropbox on the source computer:

mklink /J "C:\path\to\dropbox\savegames\best_game_ever" "C:\path\to\best_game_ever"

and the reverse for linking on the target computer:

mklink /J "C:\path\to\best_game_ever" "C:\path\to\dropbox\savegames\best_game_ever"

Once linked, you're done. Your savegames are automatically kept in sync.

Notes:

  • This uploads your savegames to Dropbox, so make sure you have a large enough Dropbox account.
  • Windows only. It's a batch script.
  • Assumes your Dropbox is located in %HOMEPATH%\Dropbox
  • Creates a folder named savegames in the root of your Dropbox folder.
  • Works with any cloud host (Dropbox, Sugarsync, Google Drive, CX, 4sync, ...) as long as the sync folder is on the same partition (can't create directory junctions between multiple drives or partitions).
  • Use at your own risk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment