Skip to content

Instantly share code, notes, and snippets.

@jeriley
Created May 28, 2025 20:18
Show Gist options
  • Save jeriley/eb9f9e1333608de5432430406496714b to your computer and use it in GitHub Desktop.
Save jeriley/eb9f9e1333608de5432430406496714b to your computer and use it in GitHub Desktop.
Backup Baldurs Gate 3 Files
# Set-ExecutionPolicy Unrestricted -Scope Process
$sourcePath = "C:\Users\<you>\AppData\Local\Larian Studios\Baldur's Gate 3\PlayerProfiles\Public\Savegames\Story"
$destinationPath = "\\nas\GameBackup\Baldurs Gate 3"
$totalFilesCopied = 0
Get-ChildItem -Path $sourcePath -Recurse | ForEach-Object {
$destinationFile = Join-Path -Path $destinationPath -ChildPath $_.FullName.Substring($sourcePath.Length)
if (-not (Test-Path -Path $destinationFile)) {
Copy-Item -Path $_.FullName -Destination $destinationFile -Force
Write-Output "Copied: $_.FullName to $destinationFile"
$totalFilesCopied++
} else {
Write-Output "Skipped: $destinationFile already exists"
}
}
Write-Output "Total files copied: $totalFilesCopied"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment