# Import Enscape Pano XML to export as image file # John Lopez | 2023 Clear-Host Write-Host "version 1.0 Convert Enscape Pano XMLs to PNG images on your local machine" #Default folder path - C:\Users\YOURNAME\Documents\Enscape\Panoramas $folderpath = "$env:USERPROFILE\Documents\Enscape\Panoramas\" #$folderpath = "$env:USERPROFILE\Documents\Enscape\BKP\" # for testing $files = Get-childitem -path $folderpath* -Include *.xml foreach ($file in $files) { #$file $file.Fullname $newfilname = ($file.name -replace '([^.]).xml','$1') + ".png" $xml= [xml]'' $xml.XmlResolver = $null $xml.load("$folderpath$($file.name)") #$xml.panoramaData.Width #$xml.panoramaData.Height #$xml.panoramaData.ViewLink #THIS IS THE BIG DATA. DONT RUN ON PS1 unless you want to wait for it to scroll through #$xml.PanoramaData.ThumbnailContent #$xml.PanoramaData.ImageContent $bytes=[convert]::FromBase64String($xml.PanoramaData.ImageContent) [io.file]::WriteAllBytes($("$folderpath$newfilname"),$bytes) }