Zum Inhalt springen

Backup Script für MSFS

  • von
Schlagwörter:

Da es ja leider den SIMstarter NG nicht für den MSFS gibt (und erstmal auch nicht geben wird), benötige ich eine Alternative um zusätzlich zum Vollbackup (mit Drive Snapshot) einzelne Dateien oder Verzeichnisse zu sichern.

Daher habe ich folgende Batchdatei erstellt. Gerne nach Bedarf anpassen.
7-ZIP muss installiert sein (https://7-zip.de/download.html)

:: Set your backup destination Folder
set backupTo=D:\BackupTemp

@echo off
cls
echo =========================================================================
echo                                               peroBackup Script mit 7-ZIP
echo                                                                      v1.0
echo =========================================================================
set timeNow=%date:~6,4%%date:~3,2%%date:~0,2%%time:~0,2%-%time:~3,2%-%time:~6,2%

:menu
echo.
echo =========================================================================
echo.
set choice=0
echo Please choose backup source:
echo 1 - Community Scenery Folder
echo 2 - Community Aircrafts Folder
echo 3 - Community Tools Folder
echo 4 - GSX config
echo 5 - MSFS config
echo 6 - A320FMGS config
echo.
set /p choice=Make your choice or press ENTER to exit:

if "%choice%"=="" goto end
if %choice%==0 goto end
if %choice%==1 goto option1
if %choice%==2 goto option2
if %choice%==3 goto option3
if %choice%==4 goto option4
if %choice%==5 goto option5
if %choice%==6 goto option6

echo Please make a valid choice!
goto menu



:option1
:: set your filename here
set filename=backup_communityScenery
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "M:\peroCommunity\Scenery"
goto menu

:option2
:: set your filename here
set filename=backup_communityAircrafts
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "M:\peroCommunity\Aircrafts"
goto menu

:option3
:: set your filename here
set filename=backup_communityTools
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "M:\peroCommunity\Tools"
goto menu

:option4
:: set your filename here
set filename=backup_GSXconfig
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Roaming\virtuali"
goto menu

:option5
set filename=backup_MSFSconfig
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\SimObjects"
"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\Cameras.cfg"
"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\FlightSimulator.cfg"
"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\GrantedRewards.bin"
"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\SimConnect.xml"
"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "C:\Users\peter\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalCache\UserCfg.opt"
goto menu

:option6
:: set your filename here
set filename=backup_A320FMGSconfig
echo Backup %filename%...

"C:\Program Files\7-Zip\7z.exe" A "%backupTo%\%filename% %timeNow%.zip" "M:\A320FMGS\*.ini" -r
goto menu

:end
start explorer.exe %backupTo%
Consent Management Platform von Real Cookie Banner