diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index f7bfa34..a6e574e 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -1378,14 +1378,16 @@ $script $ext = [IO.Path]::GetExtension($OutputFile).ToLower() if ($ext -eq '.json') { + # Save the file to the desktop using the full path $sites | ConvertTo-Json -Depth 3 | Out-File -FilePath $filePath -Encoding UTF8 } else { + # Save the file to the desktop using the full path $sites | Export-Csv -Path $filePath -NoTypeInformation -Encoding UTF8 } Write-LogHybrid "Wrote $($sites.Count) sites to $filePath" Success DattoAuth # Open the folder containing the file - Start-Process explorer.exe /select,"$filePath" + Start-Process explorer.exe /select,"$desktopPath" } else { # If SaveSitesOnly is not true, just fetch sites (for UI purposes or silent mode without saving) Write-LogHybrid "Sites fetched successfully, but not saved." Success DattoAuth