PixelForge / imageforge /scripts /restore.ps1
Gregorfun's picture
Initial commit
32c5da4
param(
[Parameter(Mandatory=$true)][string]$Source
)
$ErrorActionPreference = "Stop"
if (!(Test-Path $Source)) { throw "Backup source not found: $Source" }
Copy-Item -Recurse -Force -Path (Join-Path $Source "output") -Destination "output" -ErrorAction SilentlyContinue
Copy-Item -Force -Path (Join-Path $Source "presets.json"),(Join-Path $Source "prompt_history.json"),(Join-Path $Source "settings.json"),(Join-Path $Source "jobs_state.json") -Destination "." -ErrorAction SilentlyContinue
Write-Host "Restore completed from: $Source"