| 1 |
ninoborges |
8 |
#!python
|
| 2 |
|
|
"""
|
| 3 |
|
|
Created by Emanuel Borges
|
| 4 |
|
|
8.21.06
|
| 5 |
|
|
Version 0.1
|
| 6 |
|
|
|
| 7 |
|
|
This program will compare the roms mounted in the CD-Rom drive to the existing universe
|
| 8 |
|
|
of roms and tell you which ones are going to be "updated" if you copy. The idea is that
|
| 9 |
|
|
you will not copy the files on this list and instead copy them to a Secondary-Roms
|
| 10 |
|
|
dir and test to see which one is better, the one in roms or secondary-roms.
|
| 11 |
|
|
|
| 12 |
|
|
This should really elvolve to actually copy the roms too... and let you know what was
|
| 13 |
|
|
copied and what was not... and the number of roms copied... You would need to keep your
|
| 14 |
|
|
main roms dir pretty clean though... we want it to Update the ones that dont work. You
|
| 15 |
|
|
would need to make sure to keep only the ones that work in that dir...
|
| 16 |
|
|
"""
|
| 17 |
|
|
|
| 18 |
|
|
import os
|
| 19 |
|
|
|
| 20 |
|
|
mainRoms = "/home/xz15/xmame/roms"
|
| 21 |
|
|
output = open("/home/xz15/xmameWouldOverwrite.txt",'w')
|
| 22 |
|
|
mainRomsList= os.listdir(mainRoms)
|
| 23 |
|
|
|
| 24 |
|
|
for file in os.listdir('/mnt/cdrom'):
|
| 25 |
|
|
if file in mainRomsList:
|
| 26 |
|
|
output.write("%s is already in your Roms universe and would have overwritten\n"%file)
|
| 27 |
|
|
output.close() |