The NEW Build Your Own Arcade Controls

Main => Software Forum => Topic started by: Bloodwyn on December 28, 2008, 12:38:38 pm

Title: Solution - Create a dir with snaps that match your roms!
Post by: Bloodwyn on December 28, 2008, 12:38:38 pm
Here was my dilema that lead to this.

I have a thumb drive that I wanted 300 of my favorite mame games on. I have the roms on the thumb drive, but with 3k + snapshots and marquees.
There is NO way that a slow USB device can search thru that many images using Mala or any other frontend. I needed just the snapshots and marquees that match the roms I needed.

Using 2 different sites for help, I came up with this method.

1> Open a cmd prompt. Navigate to your rom directory and type:        dir /b > filelist.txt
     This will create a text file with the names of the roms in that directory called "Filelist.txt"
     Load this file into notepad and do a "Replace" ".zip replace with .png" Save the file


2> You will be creating a batch file that will create a new directory with images that match the names of your roms from filelist.txt
     Open up notepad and copy and paste the following:

for /f "delims=" %%i in (filelist.txt) do echo D|xcopy "J:\Mame\Snap\%%i" "c:\temp\"

Edit "J:\mame\snap\" to the name where your snaps are located. I have the files being copied to "C:temp\" you can change that to where you want your images saved.

Save the file as "yourchoiceofname.bat"

3> When you run the batch file, the .bat file and filelist.txt must be in the same directory

When the batch is finished, it will have copied ONLY the snaps that match your rom names to the new directory.

Using this method you could do the same for the marquee, cabinet, titles and artwork directories.

Hope you guys find this usefull!!

Bloodwyn

Title: Re: Solution - Create a dir with snaps that match your roms!
Post by: RetroBorg on May 17, 2016, 10:16:19 am
Well this came in handy for me 7.5 years after you wrote it.

Cheers.

 :applaud:
Title: Re: Solution - Create a dir with snaps that match your roms!
Post by: stigzler on May 24, 2016, 12:32:20 pm
Good necro... :notworthy:
Title: Re: Solution - Create a dir with snaps that match your roms!
Post by: Bloodwyn on May 25, 2016, 11:49:15 pm
Very glad this came in handy for you. I actually used this again about 2 months ago when I moved from Mala to Attract mode and revamped my arcade cabinet.
Crazy how stuff like this can save a ton of time!.

Bloodwyn