Skip to content

rodrigorega/File2clrdat

Repository files navigation

file2clrdat.py: Outputs a file in ClrMamePro dat format with rom info (hashes,
size...) from a file or files in a directory. This will speed up the process
of update ClrMamePro .dat files, without using ClrMamePro.

Usage:
  file2clrdat.py INPUT_ROM
  file2clrdat.py INPUT_ROM [(-d DAT_FILE [-m DIR] [-u DIR])] [-s SEARCH_TYPE]
  file2clrdat.py --help

Arguments:
  INPUT_ROM                            Input rom file o directory with roms.

Options:
  -d DAT_FILE, --datfile=DAT_FILE      Dat file that will be searched, type of
                                       search can be changed with "-s" option.
  -m MATCHED_DIR, --matcheddir=DIR     INPUT_ROM will be moved to MATCHED_DIR
                                       if exists in DAT_FILE.
                                       Must be used with "-d" option.
  -u UNMATCHED_DIR --unmatcheddir=DIR  INPUT_ROM will be moved to UNMATCHED_DIR
                                       if not exists in DAT_FILE.
                                       Must be used with "-d" option.
  -s SEARCH_TYPE, --searchtype=type    Set type of search that "-d" option will
                                       use. Valid "types": size, crc, md5, sha1
                                       Must be used with "-d" option.      
                                       [default: sha1]                                       
  -h, --help                           Show this help screen.

Output:
  INPUT_ROM_romdata, File with all info from INPUT_ROM
  Optional: Move scanned roms to folders.

Examples:
  - Generate rom info (rom.bin_rondata) from a single rom file:
      file2clrdat.py "c:\my_downloads\rom.bin"

  - Scan a directory, match md5 hashes of every file in that directory with
    a dat file, matched files will be moved to "dupe_roms" directory, files not
    found in dat file will be moved to "new_roms" directory adding a file with
    rom data for every file:
      file2clrdat.py "c:\my_downloaded_roms" -s md5 -d "c:\my_dat_wip\my_dat.dat" -m "c:\my_dat_wip\dupe_roms" -u "c:\my_dat_wip\new_roms"

Author: Rodrigo Rega <contacto@rodrigorega.es>
Script URL: https://github.com/rodrigorega/File2clrdat
License: CC-BY-SA 3.0 license (http://creativecommons.org/licenses/by/3.0/

About

Outputs a file in ClrMamePro dat format with rom info (hashes, size...) from a file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published