RL tutorial batchFiles
All about batch files.
While ROMLister wasn't designed for this purpose, it has shown to be a useful tool for anything you need to do repetitively on a set of ROM names.
For example, a user wanted to create an .ini file for all of the vertical games on his cabinet. This ini file told MAME to display the video in a certain mode. The details are not important for this discussion, but what was needed was that the same .ini file was created for every vertical ROM on his machine.
1) Using ROMLister, create a list of all the vertical games available. See this tutorial.
2) Then from the working list window, select batch file for the output type.
3) In the batch file text popup window, he typed in "copy c:\vertical.ini %ROM%.ini" and saved this batch file into the ini folder in his MAME setup.
He then created a single .ini file called vertical.ini and placed it in the root folder of his C: drive. When the batch file was executed, it repeatedly copied c:\vertical.ini and saved the file as each ROM name in his ini folder, thus creating the same vertical setup configuration for every vertical game on his machine.
Copying screenshots and intro movies
Another usage for batch files is to merge together your collection of snaps and avi files for all the ROMs you've got on your machine. So, if you've downloaded an entire collection of snaps and/or intro movies, and you want to only place the ones that match the ROMs your machine is now using, do the following:
1) Do you normal list making as described in the other tutorials; export the list for your particular front end.
2) With the same list, now export it as a batch file. Edit the text in the batch file to "copy %ROM%.png c:\mame\snaps" (or wherever your snapshot folder may be)
3) Save this batch file in the folder where you have your entire snap collection stored and run it. It should copy all the snaps for only the ROMs you have selected in your list over to your MAME folder.
4) Do the same thing for your .avi files, or any other file that you need where the name is based off the shorter ROM filename.
A user wanted to move all the vertical ROMs from his main folder to another, so they could be moved onto another machine.
With a simple batch file, that's pretty easy to accomplish:
0) Close the "working list" window if you have it open, so we start a new list.
1) Set the machine type to "upright"
2) Under "monitor orientation" check the vertical checkbox.
3) In all other checkboxes, 2x click them until they are all checked+gray (set to "don't care")
4) Set the number of buttons to "Any" as well as the Region settings.
5) Uncheck any boxes in the "misc." section.
-- By the end of all of these steps, your -find: text should now simply be: "(rotate=90 | rotate=270)" that's the keywords for vertical monitor.
6) Hit the Go! button
7) Select "batch file" from the dropdown list in the working list window and click the "save list to file" button.
8) In the save dialog, browse to your ROMs folder and type in a filename, let's call it "moveit.bat" and press OK.
9) Edit the text in the batch file to "move %ROM%.zip c:\vertical" and press OK.
-- ROMlister will then create a batch file in your ROMs folder called "moveit.bat"
10) Browse to your C: drive and create a new folder called "vertical" that's where the ROMs are going to get moved to.
11) Browse to your ROMs folder, locate the "moveit.bat" file and double click it. The batch file should run, and in the process move every vertical ROM over to your c:\vertical folder.