Jump to content
  • Announcement

    The HyperSpin 2 early access beta is here!

    We’re starting the first public testing phase with Platinum Members to keep the scope manageable while we test the current feature set and begin to add more. In the future, we’ll provide a version for basic members as well.  On behalf of the entire HyperSpin team, we look forward to another exciting adventure with our community.

Copy only the roms from xml


Bidley

Recommended Posts

Posted

I was wondering if there is a way to copy just the games that are in my xml to a different folder.

I want to keep the whole romset together, but I want to have a copy of the ones in my xml on an ssd.

Anybody know of an easier way to do this, rather than going through and selecting all ~1500 by hand?

Posted

If you can upload your XML database somewhere I can download it (e.g., tinyupload.com), and tell me where your roms are on your hard drive, I will generate a batch file for you to run to do this.

Posted

Right now I am just using Fishy Favs xml (mame) from hyperlist, and my roms are located in A:/ROMS/MAME.

Thanks synakcm, I really appreciate it!

Posted

FYI, unless your roms are UN-MERGED (and they're not, unless you specifically set ClrMAMEPro to do this), this isn't going to work as many games are not self contained within their own zip files. If you'd like more details on what un-merged means, read this: http://www.dweasel.com/agmfaq/index.html#toc4.4

If you're sure that your roms are un-merged, here's the commands/batch script that would copy games from Fishy Fav's xml. You can adjust as necessary depending on your destination directory.

http://pastebin.com/Sqi0WPrE

If you're interested in how to generate your own listing, I just used a quick script in Python to pull the game names from the xml.

import re
xml = open('favs.xml').read()
src = 'A:\\ROMS\\MAME\\'
dst = 'C:\\hyperspin\\roms'
for match in re.findall((r'<game name="([^"]*)'),xml):
   print 'copy "' + src + match + '.zip" "' + dst + '"'

  • 8 months later...
  • 1 year later...
Posted

I found a way to do it using Romlister to copy roms and CHD's based on the XML file.

For this I will assume you know how Romlister works.

Step one: rom files

1: go to the romlister 'set' screen and select/deselect the options for the romlist you want

2: Make the list with the [Go] button.

3: in the working list screen select 'batch file' from the dropdown menu

4: press the [save list] button

5: name you batch file 'copy-roms.bat' and save it anywhere you want.

6: Now comes the tricky part:

You then get the 'batch file creation' command screen and in the small line enter this:

xcopy "X:\ROMDIR\%ROM%.zip" "Y:\NEWROMDIR\" /e (replace .zip for .7z if you use 7zip)

Where X is drive letter of source and ROMDIR is the name of the directory where all your roms are.

Where Y is drive letter of destination and NEWROMDIR is the name of the directory you want to copy the roms

7: Press [OK] button and the batch file gets created.

8: Once done DO NOT CLOSE Romlister yet if you also want the CHD directory's and their content.

Step 2: CHD directory + content:

9: press the [save list] button again

10: name you batch file 'copy-chds.bat' and save it anywhere you want.

11: now comes the chd tricky part, I presume that you have the CHD directories in the same location as the roms:

In the 'batch file creation' command screen add the following line:

xcopy "X:\ROMDIR\%ROM%" "Y:\NEWROMDIR\%ROM%\" /s /e /i

Where X is drive letter of source and ROMDIR is the name of the directory where all your roms are.

Where Y is drive letter of destination and NEWROMDIR is the name of the directory you want to copy the chds.

11: Press [OK] button and the batch file gets created.

Now go to the directory where you saved both bat files and first run the copy-roms.bat and when finished check if everything is copied ok.

Then do the copy-chds.bat. It will go fast through the list if the rom name has no chds, if it does encounters a chd it can take a while to copy, depending on the file size of the chd's and how many.

I did this many times for all kinds of personal rom 'folders' for example only shmups roms.

Remember it can take a while if there are a lot of large chd files.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...