This is a basic Powershell script that will back up your save games to a specified directory. Each backup will be placed in a folder named after the current date and time, allowing you to keep multiple backups.
- Download the script
SaveGameBackup.ps1and place it in a directory of your choice. - Open the script in a text editor and change the value of the
$backup_foldervariable to the directory you want to back up to. - Add your games to the
$save_gamesarray, using the format:
[SaveGame]@{ Name = "THE GAME NAME"; SavePath = "C:\The\Game\Save\Path" }- Save the script.
- Run the script by right-clicking it and selecting
Run with Powershell.
You do not have to use the variables that I use for referencing system paths. The reason that exists is so that my hardcoded Windows folder path does not get committed to the repo. They should absolutely work for you, but don't hesitate to just paste your entire specific path to whatever save game location you want covered.
- Open Task Scheduler as administrator.
- Click
Create Task.... - Give the task a name and description.
- Under
Security options, selectRun with highest privileges. - Under
Configure for, selectWindows 10. - Under
Triggers, clickNew.... - Select
Dailyand clickOK. - Under
Triggers, clickNew...again. - Select
At startupand clickOK. - Under
Actions, clickNew.... - Under
Program/script, enterpowershell.exe. - Under
Add arguments, enter-File C:\Path\To\Script\SaveGameBackup.ps1. - Click
OK. - Under Settings, check
Run task as soon as possible after a scheduled start is missed - Click
OKagain.
- Click
Task Scheduler Libraryin the left pane. - Find the scheduled task in the main pane and right-click it.
- Select
Run. - If it ran correclty, you should have a Powershell window up asking you to close it, showing the results.