RetroPie: Mass Renaming of ROMs and Media Files, Generate a gamelist.xml and Modify it to Include Snaps, Boxart and Wheels

I’ve been searching for a fast way to rename my media files and generate a gamelist.xml file which contains all the game metadata (name, description, genre, release date, etc) and which points to the proper media files so that all this data will be available in RetroPie (EmulationStation). It’s taken a while but I’ve found a relatively quick way to do this which is the subject of this RetroPie: Mass Renaming article. While AttractMode doesn’t really appeal to me (I know it does appeal to many though) I did want to make sure that if I was sorting out my media, that it would be able to work in AttractMode as well as RetroPie (Emulationstation) in case I wanted to try it out at a future date. Where RetroPie (EmulationStation) uses XML files, attractmode (from my understanding) relies on matching media files names in the appropriate directory structure and appears to only link to media files and not collect other metadata such as release date, genre etc.
Other than the benefit of being able to work in both AttractMode and RetroPie (EmulationStation), the other benefit is that you can back your directory structure up, and when you do a fresh install of either system, all you have to do is copy the media over and it should instantly (well after a restart) be up and running.
This is part of my series of articles on Retro Gaming.
Download the Games and the Media
A good place to get your ROMs is either at Emuparadise, ArcadePunks or at Archive.org.
Boxart, wheels and snaps, which are video previews of each game, need to be downloaded. Some places to download this media is at EmuMovies, Hyperspin, thegamesdb or at ScreenScraper.
Setup the Directory Structure
Now that you have your ROMs we can begin with this RetroPie: Mass Renaming article. You need to setup your files in the following folders in order to be used in attract mode:
ROMs /roms/
Video Snaps (.mp4) /roms/snaps/
BoxArt Images (.jpg / .png) /roms/boxart/
Marque Banners (.jpg / .png) /roms/wheel/
If you’re looking to setup DosBox, things can be a little bit different.
[READ MORE ON DIGIMOOT: RetroPie DosBox Setup Guide]
Once you have everything downloaded and in the right folders two things need to be done. First we need to make sure all the files are named identically in each folder and subfolder. I.e. the ROM needs to be named exactly the same as the media files in their sub-directories. Then second we need to generate the .xml for emulationstation pointing to the right file images and downloading the metadata from the internet. If you’re just using AttractMode then you just need to do the first of the two steps (renaming files).
Renaming Files
The program which is going to be your friend for renaming all of your files to match is going to be FatMatch which can be downloaded in from the following locations:
https://emumovies.com/files/file/227-fatmatch-file-renamer/
http://hyperspin-fe.com/files/file/7401-fat-match-media-renamer/
FatMatch will check all your ROM file names and try to match them with the files in the folder you have selected.

You will need to select your ROMs directory and then select the image (or video snaps) directory. Enter the appropriate file extension or just leave it as ‘*’ for all extensions. Then click the start button at the top. Once the process is complete, select the results tab (shown below)

You will need to select the file to be renamed to match the ROM at the root of the tree. Go through the results and select as appropriate. This may take a bit of time to review and will vary in difficulty depending on how your files are initially named.
This process will need to be repeated for each folder (snaps, wheel and boxart) to ensure each is matching. Having all this media match is important for if you ever decide to you attractmode in the future and for step two of the process below.
[READ MORE ON DIGIMOOT: RetroPie: Setup on an x86 Machine with Linux Ubuntu or Mint]
Create XML File
Next we will need to create an XML file. Some people have used Universal XML Scraper; its not for me but feel free to try it if you like. Instead, I use Steven Selph’s scraper built into retropie.
To use this, you’ll have to copy your ROMS to the raspberry pi running retropie. Once done, follow the instructions in the video from ETAPrime below. The video will walk you through the installation and running the scraper. As ETAPrime notes you will need to switch to the raspberry pi or ssh in to it and run the scraper by inputting:
sudo ~/RetroPie-Setup/retropie_setup.sh
Once you’ve done the scraping, this will generate a gamelist.xml which will now need to be updated and edited to point to the location of the media file in the directory structure noted above. I would also recommend checking out some of the other videos on ETAPrime’s youtube page as there is a lot of helpful stuff related to retro gaming there.
Adding Media Locations to XML File
Next we will need to modify this gamelist.xml to point to the files you’ve setup previously. To do this we will use a handy little program called Gengal. It can be downloaded from file dropper here.

Before you start run Gengal, it may be a good idea to backup your gamelist.xml file. Once you’ve done that, first you will need to select the folder which contains your roms. Then check off the items (image, marquee, video) that you wish to include in your gamelist.xml file.
That’s it, You’ve now complete this RetroPie: Mass Renaming article! The process isn’t perfect, but I find it gets around 98% or 99% of the files and in a 600+ list of games there are a dozen or so that need to be manually corrected. This is MUCH, MUCH faster than manually completing the whole process.
Happy retro gaming!
~digiMoot
Hey man, would you by any chance still have a copy of gengal that you could share? It got removed from mega and the programmer seems to have forgotten about it. If you could upload it and send me a link, I’d really appreciate it.
I’ve updated the article to include a link.
Happy retro gaming!
~Raze