A script to help swapping between game types on Windows 7
notcrom
Member Posts: 6
Hiya everyone!
I've been playing a lot of multiplayer, but play a lot of single player with the same save games. Instead of copying the games myself I decided to write a script that allows me to move between games. Since this community has been pretty awesome so far I decided to share my script with ya!
It backs up your files you're copying over, too, just in case you mess up.
*WARNING*: This will not preserve any files in the directory you're copying to (other than pushing them to a backup folder)- make sure you back up those files if you have multiple saves you want to preserve that don't have any cross-over!
If you've somehow magicked your save files elsewhere, edit the line "set workingdir=" to have your special directory instead.
I don't know if this works on other versions of Windows than 7- I think it may work on Windows XP, very sure that it works on Vista, and I have no clue about Windows 8.
Cheers! Let me know if you have any questions or find any issues.
(To use the script, just copy and paste this into notepad and save as a .bat by changing "Save as type" to "All files" and ending the file with ".bat" in the filename.)
@ECHO OFF
color 0a
set workingdir="%userprofile%\My Documents\Baldur's Gate - Enhanced Edition"
echo 1 transfers single player to multiplayer
echo 2 transfers multiplayer to single player
set v=""
set /p v="Choice: "
if %v% == 1 ( goto single )
if %v% == 2 ( goto multi )
echo Bad choice. Exiting.
pause
exit
echo You chose %v%! Press enter to continue, or close the window to cancel.
pause
:single
set from=save
set to=mpsave
set endText=Copied all single player saves to multiplayer!
goto doit
:multi
set from=mpsave
set to=save
set endText=Copied all multiplayer saves to single player!
:doit
if exist %workingdir%\%to%_BACKUP ( rmdir /s /q %workingdir%\%to%_BACKUP )
mkdir %workingdir%\%to%_BACKUP
xcopy /E /Y /Q %workingdir%\%to%\* %workingdir%\%to%_BACKUP\
rmdir /s /q %workingdir%\%to%
mkdir %workingdir%\%to%
xcopy /E /Y /Q %workingdir%\%from%\* %workingdir%\%to%\
echo.
echo %endText%
:done
echo.
echo All done! Press enter to exit.
pause
I've been playing a lot of multiplayer, but play a lot of single player with the same save games. Instead of copying the games myself I decided to write a script that allows me to move between games. Since this community has been pretty awesome so far I decided to share my script with ya!
It backs up your files you're copying over, too, just in case you mess up.
*WARNING*: This will not preserve any files in the directory you're copying to (other than pushing them to a backup folder)- make sure you back up those files if you have multiple saves you want to preserve that don't have any cross-over!
If you've somehow magicked your save files elsewhere, edit the line "set workingdir=" to have your special directory instead.
I don't know if this works on other versions of Windows than 7- I think it may work on Windows XP, very sure that it works on Vista, and I have no clue about Windows 8.
Cheers! Let me know if you have any questions or find any issues.
(To use the script, just copy and paste this into notepad and save as a .bat by changing "Save as type" to "All files" and ending the file with ".bat" in the filename.)
@ECHO OFF
color 0a
set workingdir="%userprofile%\My Documents\Baldur's Gate - Enhanced Edition"
echo 1 transfers single player to multiplayer
echo 2 transfers multiplayer to single player
set v=""
set /p v="Choice: "
if %v% == 1 ( goto single )
if %v% == 2 ( goto multi )
echo Bad choice. Exiting.
pause
exit
echo You chose %v%! Press enter to continue, or close the window to cancel.
pause
:single
set from=save
set to=mpsave
set endText=Copied all single player saves to multiplayer!
goto doit
:multi
set from=mpsave
set to=save
set endText=Copied all multiplayer saves to single player!
:doit
if exist %workingdir%\%to%_BACKUP ( rmdir /s /q %workingdir%\%to%_BACKUP )
mkdir %workingdir%\%to%_BACKUP
xcopy /E /Y /Q %workingdir%\%to%\* %workingdir%\%to%_BACKUP\
rmdir /s /q %workingdir%\%to%
mkdir %workingdir%\%to%
xcopy /E /Y /Q %workingdir%\%from%\* %workingdir%\%to%\
echo.
echo %endText%
:done
echo.
echo All done! Press enter to exit.
pause
0