Bidley Posted April 25, 2012 Posted April 25, 2012 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?
synakcm Posted April 26, 2012 Posted April 26, 2012 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.
Bidley Posted April 26, 2012 Author Posted April 26, 2012 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!
synakcm Posted April 27, 2012 Posted April 27, 2012 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 + '"'
spudgunman Posted April 28, 2012 Posted April 28, 2012 you can also use any tool to parse your XML romlist back to a plain text list of the romname then use a tool like http://www.waste.org/~winkles/ROMLister/ to make a batch file to do exactly what you want... very easy work
USRFobiwan Posted July 9, 2014 Posted July 9, 2014 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.