Add Find-SaveData.ps1 helper and PowerShell command on loader card

This commit is contained in:
Justin Oros
2026-09-21 22:07:59 -07:00
parent fa84bb6eb1
commit d2e66a79fc
5 changed files with 53 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
& {
$saves = Join-Path $env:USERPROFILE 'AppData\LocalLow\Endnight\SonsOfTheForest\Saves'
if (-not (Test-Path -LiteralPath $saves)) {
Write-Host "Sons of the Forest saves folder not found: $saves" -ForegroundColor Red
return
}
$latest = Get-ChildItem -LiteralPath $saves -Filter 'SaveData.zip' -File -Recurse -ErrorAction SilentlyContinue |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $latest) {
Write-Host "No SaveData.zip found under $saves" -ForegroundColor Red
return
}
Write-Host "Latest save: $($latest.FullName)" -ForegroundColor Green
Write-Host "Last saved: $($latest.LastWriteTime)"
Write-Host "Opening Explorer. Drag SaveData.zip onto the sotf-inventory page."
Start-Process explorer.exe -ArgumentList "/select,`"$($latest.FullName)`""
}