richardoswald Posted March 27, 2021 Share Posted March 27, 2021 (edited) Hello fellow Launchboxers! I ran into an issue where I restored Launchbox and I thought I lost all of my previous "Favorites". Luckily I backed up my old Launchbox to another folder and was able to find the XMLs that contained my favorites data! I was experimenting with parsing these files with Windows Powershell and since I found the syntax I figured I'd share it here in case anyone runs into a similar issue. # For my example I wanted to get a list of of games I selected as my "Favorites" The Favorites are stored in the Platform XML files under your "Launchbox_Directory\Data\Platforms" folder # Here you are adding the xml file you want to parse and store it into memory PS F:\Programs\LaunchBox_old\Data\Platforms> [xml]$xmlDocument = Get-Content .\Arcade.xml # This next command will look for all the games where Favorite is "true" and it will only print out the titles (instead of all the xml data) PS F:\Programs\LaunchBox_old\Data\Platforms> $xmlDocument.LaunchBox.Game | where-object {$_.Favorite -eq "true"} | Select-Object Title Title ----- Caveman Ninja Arkanoid Alien vs. Predator Teenage Mutant Ninja Turtles: Turtles in Time Tron Gun Force II Tempest Gun.Smoke Pole Position Centipede Hopefully this will help some people out there and you can get creative with other parsing as well using the various fields in the xml. Another example could be: $xmlDocument.LaunchBox.Game | where-object {$_.PlayMode -eq "2-Player Simultaneous"} | Select-Object Title To get a list of all 2-player simultaneous games for that platform. Just something small I figured out to hopefully add to the wealth of knowledge on here. Edited March 27, 2021 by richardoswald 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.