diff --git a/SabreTools.Core/README.1ST b/SabreTools.Core/README.1ST index 264fb2ef..f74e9c5b 100644 --- a/SabreTools.Core/README.1ST +++ b/SabreTools.Core/README.1ST @@ -1,16 +1,16 @@ ************************************************ -* SabreTools - DAT management software * +* SabreTools - DAT management software * * https://github.com/SabreTools/SabreTools * ************************************************ Table of Contents ----------------- -1.0 Introduction and History -2.0 Included Programs - 2.1 SabreTools -3.0 Examples -4.0 Contributors -5.0 Licensing +1.0 Introduction and History +2.0 Included Programs + 2.1 SabreTools +3.0 Examples +4.0 Contributors +5.0 Licensing ** Section 1.0 - Introduction and History @@ -93,1137 +93,1173 @@ considered the reference implementation. As such, it has a lot of possible flags and options that a user can select from. Included within this tool are a few former standalone executables: - - Convert/DATToMiss: Convert an arbitrary input DAT to a different format - - DATFromDir: Create a DAT file from a set of folders and files - - DatSplit: Split a DAT based on 2 different file extensions - - Filter: Filter a DAT based on various user-defined criteria - - HashSplit: Split a DAT based on the best available hash - - MergeDAT: Merge and optionally dedupe an arbitrary number of DAT files - - SimpleSort: Convert input files to new output format, do a simple rebuild - using a DAT, and verify a folder using a given DAT - - SingleGame: Trim game and rom names to fit NTFS length standards, - optionally merging all roms to a single game and forcing unpack - - UncompressedSize: Get statistics from one or more input DATs, including - number of roms, disks, files with available hash, and size - + - Convert/DATToMiss: Convert an arbitrary input DAT to a different format + - DATFromDir: Create a DAT file from a set of folders and files + - DatSplit: Split a DAT based on 2 different file extensions + - Filter: Filter a DAT based on various user-defined criteria + - HashSplit: Split a DAT based on the best available hash + - MergeDAT: Merge and optionally dedupe an arbitrary number of DAT files + - SimpleSort: Convert input files to new output format, do a simple rebuild + using a DAT, and verify a folder using a given DAT + - SingleGame: Trim game and rom names to fit NTFS length standards, + optionally merging all roms to a single game and forcing unpack + - UncompressedSize: Get statistics from one or more input DATs, including + number of roms, disks, files with available hash, and size + Formerly included within this tool is a former standalone executable: - - DATabase/DATabaseTwo: A managed DAT tool that allows for creating - automatically merged DATs based on one or more systems, sources, or a - combination thereof - - OfflineMerge: Use merged DATs to create DATs used for managing offline - arrays + - DATabase/DATabaseTwo: A managed DAT tool that allows for creating + automatically merged DATs based on one or more systems, sources, or a + combination thereof + - OfflineMerge: Use merged DATs to create DATs used for managing offline + arrays For any command below that includes a `field` of any sort, the name are standardized: - If the field is in the header (such as filename, author, date), - the format will be `header.name` + the format will be `header.name` - If the field is in the game/machine (such as game name, publisher, manufacturer), - the format will be `game.name` + the format will be `game.name` - If the field is in the dat items (such as CRC, size, or optional flag), - the format will be `item.name` + the format will be `item.name` Usage: - SabreTools.exe [feature] [options] [filename|dirname] ... + SabreTools.exe [feature] [options] [filename|dirname] ... Universal Options: - These parameters can be enabled on any feature except Detailed Help and Help + These parameters can be enabled on any feature except Detailed Help and Help - -ll=, --log-level= Set the lowest log level for output - Set the lowest log level for output. - Possible values are: Verbose, User, Warning, Error + -ll=, --log-level= Set the lowest log level for output + Set the lowest log level for output. + Possible values are: Verbose, User, Warning, Error - -sc, --script Enable script mode (no clear screen) - For times when SabreTools is being used in a scripted environment, the - user may not want the screen to be cleared every time that it is called. - This flag allows the user to skip clearing the screen on run just like if - the console was being redirected. + -sc, --script Enable script mode (no clear screen) + For times when SabreTools is being used in a scripted environment, the + user may not want the screen to be cleared every time that it is called. + This flag allows the user to skip clearing the screen on run just like if + the console was being redirected. - -mt=, --threads= Amount of threads to use (default = # cores) - Optionally, set the number of threads to use for the multithreaded - operations. The default is the number of available machine threads; - -1 means unlimited threads created. - + -mt=, --threads= Amount of threads to use (default = # cores) + Optionally, set the number of threads to use for the multithreaded + operations. The default is the number of available machine threads; + -1 means unlimited threads created. + Features and Options: - ?, h, help Show this help - Built-in to most of the programs is a basic help text. - - ??, hd, help-detailed Show this detailed help - Display a detailed help text to the screen. - - bt, batch Enable batch mode - Run a special mode that takes input files as lists of batch commands to - run sequentially. Each command has to be its own line and must be followed - by a semicolon (`;`). Commented lines may start with either `REM` or `#`. - Multiple batch files are allowed but they will be run independently from - each other. - - The following commands are currently implemented: - - Set a header field (if default): set(header.field, value); - Parse new file(s): input(datpath, ...); - Perform a dir2dat: d2d(path, ...); - Filter on a field and value: filter(machine.field|item.field, value, [negate = false, [perMachine = false]]); - Apply a MAME Extra INI for a field: extra(field, inipath); - Perform a split/merge: merge(split|merged|nonmerged|full|device); - Set game names from description: descname(); - Run 1G1R on the items: 1g1r(region, ...); - Split into one rom per game: orpg(); - Remove fields from games/items: remove(machine.field|item.field, ...); - Remove scene dates from names: sds(); - Add new output format(s): format(datformat, ...); - Set the output directory: output(outdir); - Write the internal items: write([overwrite = true]); - Reset the internal state: reset();"; - - d, d2d, dfd Create DAT(s) from an input directory - Create a DAT file from an input directory or set of files. By default, - this will output a DAT named based on the input directory and the current - date. It will also treat all archives as possible games and add all three - hashes (CRC, MD5, SHA-1) for each file. - - -crc, --include-crc Include CRC32 in output - This enables CRC32 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -md2, --include-md2 Include MD2 in output - This enables MD2 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -md4, --include-md4 Include MD4 in output - This enables MD4 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -md5, --include-md5 Include MD5 in output - This enables MD5 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -sha1, --include-sha1 Include SHA-1 in output - This enables SHA-1 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -sha256, --include-sha256 Include SHA-256 in output - This enables SHA-256 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -sha384, --include-sha384 Include SHA-384 in output - This enables SHA-384 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -sha512, --include-sha512 Include SHA-512 in output - This enables SHA-512 calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -spamsum, --include-spamsum Include SpamSum in output - This enables SpamSum calculation for each of the files. Adding this flag - overrides the default hashing behavior of including CRC32, MD5, and - SHA-1 hashes. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name in - brackets. This flag removes that instead of the default. - - -caf, --aaruformats-as-files Treat AaruFormats as regular files - Normally, AaruFormats would be processed using their internal hash to - compare against the input DATs. This flag forces all AaruFormats to be - treated like regular files. - - -aaf, --archives-as-files Treat archives as files - Instead of trying to enumerate the files within archives, treat the - archives as files themselves. This is good for uncompressed sets that - include archives that should be read as-is. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to be - treated like regular files. - - -ot=, --output-type= Output DATs to a specified format - Add outputting the created DAT to known format. Multiple instances of - this flag are allowed. - - Possible values are: - all - All available DAT types - ado, archive - Archive.org file list - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md2 - MD2 - md4 - MD4 - md5 - MD5 - msx, openmsx - openMSX Software List - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sj, sabrejson - SabreJSON - sx, sabrexml - SabreDAT XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - smdb, everdrive - Everdrive SMDB - sl, softwarelist - MAME Software List XML - spamsum - SpamSum - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -dpc, --deprecated Output 'game' instead of 'machine' - By default, Logiqx XML DATs output with the more modern "machine" - tag for each set. This flag allows users to output the older - "game" tag instead, for compatibility reasons. [Logiqx only] - - -ro, --romba Treat like a Romba depot (requires SHA-1) - This flag allows reading and writing of DATs and output files to and - from a Romba-style depot. This also implies TorrentGZ input and - output for physical files. Where appropriate, Romba depot files will - be created as well. - - --depr, --romba-depth Set depth of depot for outputs - Optionally, set the depth of output depots. Defaults to 4 deep - otherwise. - - -ska, --skip-archives Skip all archives - Skip any files that are treated like archives - - -skf, --skip-files Skip all non-archives - Skip any files that are not treated like archives - - -f=, --filename= Set the external name of the DAT - Set the external filename for the output DAT(s) - - -n=, --name= Set the internal name of the DAT - Set the name header field for the output DAT(s) - - -de=, --description= Set the description of the DAT - Set the description header field for the output DAT(s) - - -c=, --category= Set the category of the DAT - Set the category header field for the output DAT(s) - - -r=, --root= Set a new rootdir - Set the rootdir (as used by SuperDAT mode) for the output DAT(s). - - -v=, --version= Set the version of the DAT - Set the version header field for the output DAT(s) - - -au=, --author= Set the author of the DAT - Set the author header field for the output DAT(s) - - -em=, --email= Set a new email of the DAT - Set the email header field for the output DAT(s) - - -hp=, --homepage= Set a new homepage of the DAT - Set the homepage header field for the output DAT(s) - - -u=, --url= Set a new URL of the DAT - Set the URL header field for the output DAT(s) - - -co=, --comment= Set a new comment of the DAT - Set the comment header field for the output DAT(s) - - -sd, --superdat Enable SuperDAT creation - Set the type flag to "SuperDAT" for the output DAT as well as - preserving the directory structure of the inputted folder, if - applicable. - - -fm=, --forcemerging= Set force merging - Set the forcemerging tag to the given value. - Possible values are: None, Split, Device, Merged, Nonmerged, Full - - -fn=, --forcenodump= Set force nodump - Set the forcenodump tag to the given value. - Possible values are: None, Obsolete, Required, Ignore - - -fp=, --forcepacking= Set force packing - Set the forcepacking tag to the given value. - Possible values are: None, Zip, Unzip, Partial, Flat - - -ef=, --exclude-field= Exclude a game/rom field from outputs - Exclude any valid item or machine field from outputs. Examples - include: romof, publisher, and offset. - - -1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per region - This allows users to input a list of regions to use to filter on - in order so only one game from each set of parent and clones will be - included. This requires either cloneof or romof tags to function - properly. - - -reg, --region Add a region for 1G1R - Add a region (in order) for use with 1G1R filtering. If this is - not supplied, then by default, only parent sets will be included - in the output. Multiple instances of this flag are allowed. - - -orpg, --one-rom-per-game Try to ensure each rom has its own game - In some cases, it is beneficial to have every rom put into its own - output set as a subfolder of the original parent. This flag enables - outputting each rom to its own game for this purpose. - - -sds, --scene-date-strip Remove date from scene-named sets - If this flag is enabled, sets with "scene" names will have the date - removed from the beginning. For example "01.01.01-Game_Name-GROUP" - would become "Game_Name-Group". - - -ab, --add-blank-files Output blank files for folders - If this flag is set, then blank entries will be created for each of - the empty directories in the source. This is useful for tools that - require all folders be accounted for in the output DAT. - - -ad, --add-date Add dates to items, where possible - If this flag is set, then the Date will be appended to each file - information in the output DAT. The output format is standardized as - "yyyy/MM/dd HH:mm:ss". - - -h=, --header= Set a header skipper to use, blank means all - Set the header special field for the output DAT(s). In file - rebuilding, this flag allows for either all copier headers (using "") - or specific copier headers by name (such as "fds.xml") to determine - if a file matches or not. - - -ini=, --extra-ini= Apply a MAME INI for given field(s) - Apply any valid MAME INI for any valid field in the DatFile. Inputs are - of the form 'Field:path\to\ini'. Multiple instances of this flag are - allowed. - - -fi=, --filter= Filter a game/rom field with the given value(s) - Filter any valid item or machine field from inputs. Filters are input - in the form 'key=value' or 'key!=value', where the '!' signifies 'not - matching'. Numeric values may also prefix the 'value' with '>', '<', or - '=' accordingly. Key examples include: romof, category, and game. - Additionally, the user can specify an exact match or full C#-style - regex for pattern matching. Multiple instances of this flag are - allowed. - - -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters - If filter or exclude by game name is used, this flag will allow those - filters to be checked against the romof and cloneof tags as well. - This can allow for more advanced set-building, especially in - arcade-based sets. - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - ss, sort Sort inputs by a set of DATs - This feature allows the user to quickly rebuild based on a supplied DAT - file(s). By default all files will be rebuilt to uncompressed folders in - the output directory. - - -dat=, --dat= Input DAT to be used - User-supplied DAT for use in all operations. Multiple instances of - this flag are allowed. - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - -dep, --depot Assume directories are romba depots - Normally, input directories will be treated with no special format. - If this flag is used, all input directories will be assumed to be - romba-style depots. - - --depd, --depot-depth Set depth of depot for inputs - Optionally, set the depth of input depots. Defaults to 4 deep - otherwise. - - -del, --delete Delete fully rebuilt input files - Optionally, the input files, once processed and fully matched, can be - deleted. This can be useful when the original file structure is no - longer needed or if there is limited space on the source drive. - - -in, --inverse Rebuild only files not in DAT - Instead of the normal behavior of rebuilding using a DAT, this flag - allows the user to use the DAT as a filter instead. All files that - are found in the DAT will be skipped and everything else will be - output in the selected format. - - -qs, --quick Enable quick scanning of archives - For all archives, if this flag is enabled, it will only use the - header information to get the archive entries' file information. The - upside to this is that it is the fastest option. On the downside, it - can only get the CRC and size from most archive formats, leading to - possible issues. - - -caf, --aaruformats-as-files Treat AaruFormats as regular files - Normally, AaruFormats would be processed using their internal hash to - compare against the input DATs. This flag forces all AaruFormats to be - treated like regular files. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to be - treated like regular files. - - -ad, --add-date Add dates to items, where possible - If this flag is set, then the Date will be appended to each file - information in the output DAT. The output format is standardized as - "yyyy/MM/dd HH:mm:ss". - - -ind, --individual Process input DATs individually - In cases where DATs would be processed in bulk, this flag allows them - to be processed on their own instead. - - -t7z, --torrent-7zip Enable Torrent7Zip output - Instead of outputting the files to folder, files will be rebuilt to - Torrent7Zip (T7Z) files. This format is based on the LZMA container - format 7Zip, but with custom header information. This is currently - unused by any major application. Currently does not produce proper - Torrent-compatible outputs. - - -tar, --tar Enable Tape ARchive output - Instead of outputting the files to folder, files will be rebuilt to - Tape ARchive (TAR) files. This format is a standardized storage - archive without any compression, usually used with other compression - formats around it. It is widely used in backup applications and - source code archives. - - -tgz, --torrent-gzip Enable Torrent GZip output - Instead of outputting the files to folder, files will be rebuilt to - TorrentGZ (TGZ) files. This format is based on the GZip archive - format, but with custom header information and a file name replaced - by the SHA-1 of the file inside. This is primarily used by external - tool Romba (https://github.com/uwedeportivo/romba), but may be used - more widely in the future. - - -ro, --romba Treat like a Romba depot (requires SHA-1) - This flag allows reading and writing of DATs and output files to - and from a Romba-style depot. This also implies TorrentGZ input - and output for physical files. Where appropriate, Romba depot - files will be created as well. - - --depr, --romba-depth Set depth of depot for outputs - Optionally, set the depth of output depots. Defaults to 4 deep - otherwise. - - -tzip, --torrent-zip Enable Torrent Zip output - Instead of outputting files to folder, files will be rebuilt to - TorrentZip (TZip) files. This format is based on the ZIP archive - format, but with custom header information. This is primarily used by - external tool RomVault (http://www.romvault.com/) and is already - widely used. - - -h=, --header= Set a header skipper to use, blank means all - Set the header special field for the output DAT(s). In file - rebuilding, this flag allows for either all copier headers (using "") - or specific copier headers by name (such as "fds.xml") to determine - if a file matches or not. - - -dm, --dat-merged Force creating merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dfm, --dat-full-merged Force creating fully merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag while also performing deduplication - within a parent. This is incompatible with the other --dat-X flags. - - -ds, --dat-split Force creating split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnm, --dat-non-merged Force creating non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. - - -ud, --update-dat Output updated DAT to output directory - Once the files that were able to rebuilt are taken care of, a DAT of - the files that could not be matched will be output to the output - directory. - - sp, split Split input DATs by a given criteria - This feature allows the user to split input DATs by a number of different - possible criteria. See the individual input information for details. More - than one split type is allowed at a time. - - -ot=, --output-type= Output DATs to a specified format - Add outputting the created DAT to known format. Multiple instances of - this flag are allowed. - - Possible values are: - all - All available DAT types - ado, archive - Archive.org file list - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md2 - MD2 - md4 - MD4 - md5 - MD5 - msx, openmsx - openMSX Software List - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sj, sabrejson - SabreJSON - sx, sabrexml - SabreDAT XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - smdb, everdrive - Everdrive SMDB - sl, softwarelist - MAME Software List XML - spamsum - SpamSum - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -dpc, --deprecated Output 'game' instead of 'machine' - By default, Logiqx XML DATs output with the more modern "machine" - tag for each set. This flag allows users to output the older - "game" tag instead, for compatibility reasons. [Logiqx only] - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - -ip, --inplace Write to the input directories, where possible - By default, files are written to the runtime directory (or the output - directory, if set). This flag enables users to write out to the - directory that the DATs originated from. - - -es, --extension Split DAT(s) by two file extensions - For a DAT, or set of DATs, allow for splitting based on a list of - input extensions. This can allow for combined DAT files, such as - those combining two separate systems, to be split. Files with any - extensions not listed in the input lists will be included in both - outputted DAT files. - - -exta=, --exta= Set extension to be included in first DAT - Set the extension to be used to populate the first DAT. Multiple - instances of this flag are allowed. - - -extb=, --extb= Set extension to be included in second DAT - Set the extension to be used to populate the second DAT. Multiple - instances of this flag are allowed. - - -hs, --hash Split DAT(s) or folder by best-available hashes - For a DAT, or set of DATs, allow for splitting based on the best - available hash for each file within. The order of preference for the - outputted DATs is as follows: Nodump, SHA-512, SHA-384, SHA-256, - SHA-1, MD5, MD4, MD2, CRC (or worse). - - -ls, --level Split a SuperDAT or folder by lowest available level - For a DAT, or set of DATs, allow for splitting based on the lowest - available level of game name. That is, if a game name is - top/mid/last, then it will create an output DAT for the parent - directory "mid" in a folder called "top" with a game called "last". - - -s, --short Use short output names - Instead of using ClrMamePro-style long names for DATs, use just - the name of the folder as the name of the DAT. This can be used - in conjunction with --base to output in the format of "Original - Name (Name)" instead. - - -ba, --base Use source DAT as base name for outputs - If splitting an entire folder of DATs, some output files may be - normally overwritten since the names would be the same. With this - flag, the original DAT name is used in the output name, in the - format of "Original Name(Dir - Name)". This can be used in - conjunction with --short to output in the format of "Original - Name (Name)" instead. - - -szs, --size Split DAT(s) or folder by file sizes - For a DAT, or set of DATs, allow for splitting based on the sizes of - the files, specifically if the type is a Rom (most item types don't - have sizes). - - -rad=, --radix= Set the midpoint to split at - Set the size at which all roms less than the size are put in the - first DAT, and everything greater than or equal goes in the - second. - - -tis, --total-size Split DAT(s) or folder by total game sizes - For a DAT, or set of DATs, allow for splitting based on the combined - sizes of the games, splitting into individual chunks. - - -cs=, --chunk-size= Set a chunk size to output - Set the total game size to cut off at for each chunked DAT. It is - recommended to use a sufficiently large size such as 1GB or else - you may run into issues, especially if a single game could be - larger than the size provided. - - -ts, --type Split DAT(s) or folder by file types (rom/disk) - For a DAT, or set of DATs, allow for splitting based on the types of - the files, specifically if the type is a rom or a disk. - - st, stats Get statistics on all input DATs - This will output by default the combined statistics for all input DAT - files. - - The stats that are outputted are as follows: - - Total uncompressed size - - Number of games found - - Number of roms found - - Number of disks found - - Items that include a CRC - - Items that include a MD5 - - Items that include a SHA-1 - - Items that include a SHA-256 - - Items that include a SHA-384 - - Items that include a SHA-512 - - Items with Nodump status - - -srt=, --report-type= Output statistics to a specified format - Add outputting the created DAT to known format. Multiple instances of - this flag are allowed. - - Possible values are: - all - All available report types - csv - Standardized Comma-Separated Value - html - HTML webpage - ssv - Standardized Semicolon-Separated Value - text - Generic textfile - tsv - Standardized Tab-Separated Value - - -f=, --filename= Set the external name of the DAT - Set the external filename for the output DAT(s) - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - -bc, --baddump-column Add baddump stats to output - Add a new column or field for counting the number of baddumps in the - DAT. - - -nc, --nodump-column Add statistics for nodumps to output - Add a new column or field for counting the number of nodumps in the - DAT. - - -ind, --individual Process input DATs individually - In cases where DATs would be processed in bulk, this flag allows them - to be processed on their own instead. - - ud, update Update and manipulate DAT(s) - This is the multitool part of the program, allowing for almost every - manipulation to a DAT, or set of DATs. This is also a combination of many - different programs that performed DAT manipulation that work better - together. - - -ot=, --output-type= Output DATs to a specified format - Add outputting the created DAT to known format. Multiple instances of - this flag are allowed. - - Possible values are: - all - All available DAT types - ado, archive - Archive.org file list - am, attractmode - AttractMode XML - cmp, clrmamepro - ClrMamePro - csv - Standardized Comma-Separated Value - dc, doscenter - DOSCenter - lr, listrom - MAME Listrom - lx, listxml - MAME Listxml - miss, missfile - GoodTools Missfile - md2 - MD2 - md4 - MD4 - md5 - MD5 - msx, openmsx - openMSX Software List - ol, offlinelist - OfflineList XML - rc, romcenter - RomCenter - sj, sabrejson - SabreJSON - sx, sabrexml - SabreDAT XML - sfv - SFV - sha1 - SHA1 - sha256 - SHA256 - sha384 - SHA384 - sha512 - SHA512 - smdb, everdrive - Everdrive SMDB - sl, softwarelist - MAME Software List XML - spamsum - SpamSum - ssv - Standardized Semicolon-Separated Value - tsv - Standardized Tab-Separated Value - xml, logiqx - Logiqx XML - - -pre=, --prefix= Set prefix for all lines - Set a generic prefix to be prepended to all outputted lines. - - -post=, --postfix= Set postfix for all lines - Set a generic postfix to be appended to all outputted lines. - - Some special strings that can be used for prefix and postfix: - - %game% / %machine% - Replaced with the Game/Machine name - - %name% - Replaced with the Rom name - - %manufacturer% - Replaced with game Manufacturer - - %publisher% - Replaced with game Publisher - - %category% - Replaced with game Category - - %crc% - Replaced with the CRC - - %md2% - Replaced with the MD2 - - %md4% - Replaced with the MD4 - - %md5% - Replaced with the MD5 - - %sha1% - Replaced with the SHA-1 - - %sha256% - Replaced with the SHA-256 - - %sha384% - Replaced with the SHA-384 - - %sha512% - Replaced with the SHA-512 - - %size% - Replaced with the size - - -q, --quotes Double-quote each item - This flag surrounds the item by double-quotes, not including the - prefix or postfix. - - -r, --roms Output roms to miss instead of sets - By default, the outputted file will include the name of the game - so this flag allows for the name of the rom to be output instead. - [Missfile only] - - -gp, --game-prefix Add game name as a prefix - This flag allows for the name of the game to be used as a prefix - to each file. - - -ae=, --add-extension= Add an extension to each item - Add a postfix extension to each full item name. - - -rep=, --replace-extension= Replace all extensions with specified - When an extension exists, replace it with the provided instead. - - -rme, --remove-extensions Remove all extensions from all items - For each item, remove the extension. - - -ro, --romba Treat like a Romba depot (requires SHA-1) - This flag allows reading and writing of DATs and output files to - and from a Romba-style depot. This also implies TorrentGZ input - and output for physical files. Where appropriate, Romba depot - files will be created as well. - - --depr, --romba-depth Set depth of depot for outputs - Optionally, set the depth of output depots. Defaults to 4 deep - otherwise. - - -dpc, --deprecated Output 'game' instead of 'machine' - By default, Logiqx XML DATs output with the more modern "machine" - tag for each set. This flag allows users to output the older - "game" tag instead, for compatibility reasons. [Logiqx only] - - -f=, --filename= Set the external name of the DAT - Set the external filename for the output DAT(s) - - -n=, --name= Set the internal name of the DAT - Set the name header field for the output DAT(s) - - -de=, --description= Set the description of the DAT - Set the description header field for the output DAT(s) - - -c=, --category= Set the category of the DAT - Set the category header field for the output DAT(s) - - -r=, --root= Set a new rootdir - Set the rootdir (as used by SuperDAT mode) for the output DAT(s). - - -v=, --version= Set the version of the DAT - Set the version header field for the output DAT(s) - - -da=, --date= Set a new date - Set the date header field for the output DAT(s) - - -au=, --author= Set the author of the DAT - Set the author header field for the output DAT(s) - - -em=, --email= Set a new email of the DAT - Set the email header field for the output DAT(s) - - -hp=, --homepage= Set a new homepage of the DAT - Set the homepage header field for the output DAT(s) - - -u=, --url= Set a new URL of the DAT - Set the URL header field for the output DAT(s) - - -co=, --comment= Set a new comment of the DAT - Set the comment header field for the output DAT(s) - - -h=, --header= Set a header skipper to use, blank means all - Set the header special field for the output DAT(s). In file - rebuilding, this flag allows for either all copier headers (using "") - or specific copier headers by name (such as "fds.xml") to determine - if a file matches or not. - - -sd, --superdat Enable SuperDAT creation - Set the type flag to "SuperDAT" for the output DAT as well as - preserving the directory structure of the inputted folder, if - applicable. - - -fm=, --forcemerging= Set force merging - Set the forcemerging tag to the given value. - Possible values are: None, Split, Device, Merged, Nonmerged, Full - - -fn=, --forcenodump= Set force nodump - Set the forcenodump tag to the given value. - Possible values are: None, Obsolete, Required, Ignore - - -fp=, --forcepacking= Set force packing - Set the forcepacking tag to the given value. - Possible values are: None, Zip, Unzip, Partial, Flat - - -ef=, --exclude-field= Exclude a game/rom field from outputs - Exclude any valid item or machine field from outputs. Examples - include: romof, publisher, and offset. - - -1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per region - This allows users to input a list of regions to use to filter on - in order so only one game from each set of parent and clones will be - included. This requires either cloneof or romof tags to function - properly. - - -reg, --region Add a region for 1G1R - Add a region (in order) for use with 1G1R filtering. If this is - not supplied, then by default, only parent sets will be included - in the output. Multiple instances of this flag are allowed. - - -orpg, --one-rom-per-game Try to ensure each rom has its own game - In some cases, it is beneficial to have every rom put into its own - output set as a subfolder of the original parent. This flag enables - outputting each rom to its own game for this purpose. - - -keg, --keep-empty-games Keep originally empty sets from the input(s) - Normally, any sets that are considered empty will not be included in - the output, this flag allows these empty sets to be added to the - output. - - -sds, --scene-date-strip Remove date from scene-named sets - If this flag is enabled, sets with "scene" names will have the date - removed from the beginning. For example "01.01.01-Game_Name-GROUP" - would become "Game_Name-Group". - - -clean, --clean Clean game names according to WoD standards - Game names will be sanitized to remove what the original WoD - standards deemed as unneeded information, such as parenthesized or - bracketed strings. - - -ru, --remove-unicode Remove unicode characters from names - By default, the character set from the original file(s) will be used - for item naming. This flag removes all Unicode characters from the - item names, machine names, and machine descriptions. - - -dan, --description-as-name Use description instead of machine name - By default, all DATs are converted exactly as they are input. - Enabling this flag allows for the machine names in the DAT to be - replaced by the machine description instead. In most cases, this will - result in no change in the output DAT, but a notable example would be - a software list DAT where the machine names are generally - DOS-friendly while the description is more complete. - - -dm, --dat-merged Force creating merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dfm, --dat-full-merged Force creating fully merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag while also performing deduplication - within a parent. This is incompatible with the other --dat-X flags. - - -ds, --dat-split Force creating split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnm, --dat-non-merged Force creating non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. - - -trim, --trim Trim file names to fit NTFS length - In the cases where files will have too long a name, this allows for - trimming the name of the files to the NTFS maximum length at most. - - -rd=, --root-dir= Set the root directory for calc - In the case that the files will not be stored from the root - directory, a new root can be set for path length calculations. - - -si, --single-set All game names replaced by '!' - This is useful for keeping all roms in a DAT in the same archive or - folder. - - -dd, --dedup Enable deduping in the created DAT - For all outputted DATs, allow for hash deduping. This makes sure that - there are effectively no duplicates in the output files. Cannot be - used with game dedup. - - -gdd, --game-dedup Enable deduping within games in the created DAT - For all outputted DATs, allow for hash deduping but only within the - games, and not across the entire DAT. This makes sure that there are - effectively no duplicates within each of the output sets. Cannot be - used with standard dedup. - - -m, --merge Merge the input DATs - By default, all DATs are processed individually with the - user-specified flags. With this flag enabled, all of the input DATs - are merged into a single output. This is best used with the dedup - flag. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -di, --diff-all Create diffdats from inputs (all standard outputs) - By default, all DATs are processed individually with the - user-specified flags. With this flag enabled, input DATs are diffed - against each other to find duplicates, no duplicates, and only in - individuals. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -did, --diff-duplicates Create diffdat containing just duplicates - All files that have duplicates outside of the original DAT are - included. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -dii, --diff-individuals Create diffdats for individual DATs - All files that have no duplicates outside of the original DATs are - put into DATs that are named after the source DAT. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -din, --diff-no-duplicates Create diffdat containing no duplicates - All files that have no duplicates outside of the original DATs are - included. - - -b, --no-automatic-date Don't include date in file name - Normally, the DAT will be created with the date in the file name - in brackets. This flag removes that instead of the default. - - -dag, --diff-against Diff all inputs against a set of base DATs - This flag will enable a special type of diffing in which a set of - base DATs are used as a comparison point for each of the input DATs. - This allows users to get a slightly different output to cascaded - diffing, which may be more useful in some cases. This is heavily - influenced by the diffing model used by Romba. - - -bd=, --base-dat= Add a base DAT for processing - Add a DAT or folder of DATs to the base set to be used for all - operations. Multiple instances of this flag are allowed. - - -bg, --by-game Diff against by game instead of hashes - By default, diffing against uses hashes to determine similar files. - This flag enables using using each game as a comparision point - instead. - - -br, --base-replace Replace from base DATs in order - By default, no item names are changed except when there is a merge - occurring. This flag enables users to define a DAT or set of base - DATs to use as "replacements" for all input DATs. Note that the first - found instance of an item in the base DAT(s) will be used and all - others will be discarded. If no additional flag is given, it will - default to updating names. - - -rbr, --reverse-base-replace Replace item names from base DATs in reverse - By default, no item names are changed except when there is a merge - occurring. This flag enables users to define a DAT or set of base - DATs to use as "replacements" for all input DATs. Note that the first - found instance of an item in the last base DAT(s) will be used and - all others will be discarded. If no additional flag is given, it will - default to updating names. - - -bd=, --base-dat= Add a base DAT for processing - Add a DAT or folder of DATs to the base set to be used for all - operations. Multiple instances of this flag are allowed. - [Both base-replace and reverse-base-replace] - - -uf, --update-field Update a game/rom field from base DATs - Update any valid item or machine field from base DAT(s). Examples - include: romof, publisher, and offset. - [Both base-replace and reverse-base-replace] - - -ons, --only-same Only update description if machine name matches description - Normally, updating the description will always overwrite if - the machine names are the same. With this flag, descriptions - will only be overwritten if they are the same as the machine - names. - - -dc, --diff-cascade Enable cascaded diffing - This flag allows for a special type of diffing in which the first DAT - is considered a base, and for each additional input DAT, it only - leaves the files that are not in one of the previous DATs. This can - allow for the creation of rollback sets or even just reduce the - amount of duplicates across multiple sets. - - -drc, --diff-reverse-cascade Enable reverse cascaded diffing - This flag allows for a special type of diffing in which the last DAT - is considered a base, and for each additional input DAT, it only - leaves the files that are not in one of the previous DATs. This can - allow for the creation of rollback sets or even just reduce the - amount of duplicates across multiple sets. - - -sf, --skip-first-output Skip output of first DAT - In times where the first DAT does not need to be written out a - second time, this will skip writing it. This can often speed up - the output process. [Both diff-cascade and diff-reverse-cascade] - - -ini=, --extra-ini= Apply a MAME INI for given field(s) - Apply any valid MAME INI for any valid field in the DatFile. Inputs are - of the form 'Field:path\to\ini'. Multiple instances of this flag are - allowed. - - -fi=, --filter= Filter a game/rom field with the given value(s) - Filter any valid item or machine field from inputs. Filters are input - in the form 'key=value' or 'key!=value', where the '!' signifies 'not - matching'. Numeric values may also prefix the 'value' with '>', '<', or - '=' accordingly. Key examples include: romof, category, and game. - Additionally, the user can specify an exact match or full C#-style - regex for pattern matching. Multiple instances of this flag are - allowed. - - -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters - If filter or exclude by game name is used, this flag will allow those - filters to be checked against the romof and cloneof tags as well. - This can allow for more advanced set-building, especially in - arcade-based sets. - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - -ip, --inplace Write to the input directories, where possible - By default, files are written to the runtime directory (or the output - directory, if set). This flag enables users to write out to the - directory that the DATs originated from. - - v, version Prints version - Prints current program version. - - ve, verify Verify a folder against DATs - When used, this will use an input DAT or set of DATs to blindly check - against an input folder. The base of the folder is considered the base - for the combined DATs and games are either the directories or archives - within. This will only do a direct verification of the items within and - will create a fixdat afterwards for missing files. - - -dat=, --dat= Input DAT to be used - User-supplied DAT for use in all operations. Multiple instances of - this flag are allowed. - - -dep, --depot Assume directories are romba depots - Normally, input directories will be treated with no special format. - If this flag is used, all input directories will be assumed to be - romba-style depots. - - --depd, --depot-depth Set depth of depot for inputs - Optionally, set the depth of input depots. Defaults to 4 deep - otherwise. - - -out=, --output-dir= Set output directory - This sets an output folder to be used when the files are created. If - a path is not defined, the runtime directory is used instead. - - -ho, --hash-only Check files by hash only - This sets a mode where files are not checked based on name but rather - hash alone. This allows verification of (possibly) incorrectly named - folders and sets to be verified without worrying about the proper set - structure to be there. - - -qs, --quick Enable quick scanning of archives - For all archives, if this flag is enabled, it will only use the - header information to get the archive entries' file information. The - upside to this is that it is the fastest option. On the downside, it - can only get the CRC and size from most archive formats, leading to - possible issues. - - -h=, --header= Set a header skipper to use, blank means all - Set the header special field for the output DAT(s). In file - rebuilding, this flag allows for either all copier headers (using "") - or specific copier headers by name (such as "fds.xml") to determine - if a file matches or not. - - -caf, --aaruformats-as-files Treat AaruFormats as regular files - Normally, AaruFormats would be processed using their internal hash to - compare against the input DATs. This flag forces all AaruFormats to be - treated like regular files. - - -ic, --chds-as-files Treat CHDs as regular files - Normally, CHDs would be processed using their internal hash to - compare against the input DATs. This flag forces all CHDs to be - treated like regular files. - - -ind, --individual Process input DATs individually - In cases where DATs would be processed in bulk, this flag allows them - to be processed on their own instead. - - -dm, --dat-merged Force creating merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag. This is incompatible with the - other --dat-X flags. - - -dfm, --dat-full-merged Force creating fully merged sets - Preprocess the DAT to have parent sets contain all items from the - children based on the cloneof tag while also performing deduplication - within a parent. This is incompatible with the other --dat-X flags. - - -ds, --dat-split Force creating split sets - Preprocess the DAT to remove redundant files between parents and - children based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -dnd, --dat-device-non-merged Create device non-merged sets - Preprocess the DAT to have child sets contain all items from the - device references. This is incompatible with the other --dat-X flags. - - -dnm, --dat-non-merged Force creating non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent set based on the romof and cloneof tags. This is incompatible - with the other --dat-X flags. - - -df, --dat-full-non-merged Create fully non-merged sets - Preprocess the DAT to have child sets contain all items from the - parent sets based on the cloneof and romof tags as well as device - references. This is incompatible with the other --dat-X flags. - - -ini=, --extra-ini= Apply a MAME INI for given field(s) - Apply any valid MAME INI for any valid field in the DatFile. Inputs are - of the form 'Field:path\to\ini'. Multiple instances of this flag are - allowed. - - -fi=, --filter= Filter a game/rom field with the given value(s) - Filter any valid item or machine field from inputs. Filters are input - in the form 'key=value' or 'key!=value', where the '!' signifies 'not - matching'. Numeric values may also prefix the 'value' with '>', '<', or - '=' accordingly. Key examples include: romof, category, and game. - Additionally, the user can specify an exact match or full C#-style - regex for pattern matching. Multiple instances of this flag are - allowed. - - -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters - If filter or exclude by game name is used, this flag will allow those - filters to be checked against the romof and cloneof tags as well. - This can allow for more advanced set-building, especially in - arcade-based sets. + ?, h, help Show this help + Built-in to most of the programs is a basic help text. + + ??, hd, help-detailed Show this detailed help + Display a detailed help text to the screen. + + bt, batch Enable batch mode + Run a special mode that takes input files as lists of batch commands to + run sequentially. Each command has to be its own line and must be + followed by a semicolon (`;`). Commented lines may start with either + `REM` or `#`. Multiple batch files are allowed but they will be run + independently from each other. + + The following commands are currently implemented: + + Set a header field (if default): set(header.field, value); + Parse new file(s): input(datpath, ...); + Perform a dir2dat: d2d(path, ...); + Filter on a field and value: filter(machine.field|item.field, value, [remove = false, [perMachine = false]]); + Apply a MAME Extra INI for a field: extra(field, inipath); + Perform a split/merge: merge(split|merged|nonmerged|full|device); + Set game names from description: descname(); + Run 1G1R on the items: 1g1r(region, ...); + Split into one rom per game: orpg(); + Remove fields from games/items: remove(machine.field|item.field, ...); + Remove scene dates from names: sds(); + Add new output format(s): format(datformat, ...); + Set the output directory: output(outdir); + Write the internal items: write([overwrite = true]); + Reset the internal state: reset(); + + d, d2d, dfd Create DAT(s) from an input directory + Create a DAT file from an input directory or set of files. By default, + this will output a DAT named based on the input directory and the current + date. It will also treat all archives as possible games and add all three + hashes (CRC, MD5, SHA-1) for each file. + + -crc, --include-crc Include CRC32 in output + This enables CRC32 calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -md2, --include-md2 Include MD2 in output + This enables MD2 calculation for each of the files. Adding this flag + overrides the default hashing behavior of including CRC32, MD5, and + SHA-1 hashes. + + -md4, --include-md4 Include MD4 in output + This enables MD4 calculation for each of the files. Adding this flag + overrides the default hashing behavior of including CRC32, MD5, and + SHA-1 hashes. + + -md5, --include-md5 Include MD5 in output + This enables MD5 calculation for each of the files. Adding this flag + overrides the default hashing behavior of including CRC32, MD5, and + SHA-1 hashes. + + -sha1, --include-sha1 Include SHA-1 in output + This enables SHA-1 calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -sha256, --include-sha256 Include SHA-256 in output + This enables SHA-256 calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -sha384, --include-sha384 Include SHA-384 in output + This enables SHA-384 calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -sha512, --include-sha512 Include SHA-512 in output + This enables SHA-512 calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -spamsum, --include-spamsum Include SpamSum in output + This enables SpamSum calculation for each of the files. Adding this + flag overrides the default hashing behavior of including CRC32, MD5, + and SHA-1 hashes. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name in + brackets. This flag removes that instead of the default. + + -caf, --aaruformats-as-files Treat AaruFormats as files + Normally, AaruFormats would be processed using their internal hash to + compare against the input DATs. This flag forces all AaruFormats to + be treated like regular files. + + -aaf, --archives-as-files Treat archives as files + Instead of trying to enumerate the files within archives, treat the + archives as files themselves. This is good for uncompressed sets that + include archives that should be read as-is. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -ot=, --output-type= Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + ado, archive - Archive.org file list + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md2 - MD2 + md4 - MD4 + md5 - MD5 + msx, openmsx - openMSX Software List + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sj, sabrejson - SabreJSON + sx, sabrexml - SabreDAT XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + smdb, everdrive - Everdrive SMDB + sl, softwarelist - MAME Software List XML + spamsum - SpamSum + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -dpc, --deprecated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to and + from a Romba-style depot. This also implies TorrentGZ input and + output for physical files. Where appropriate, Romba depot files will + be created as well. + + -depr=, --romba-depth= Set depth of depot for outputs + Optionally, set the depth of output depots. Defaults to 4 deep + otherwise. + + -ska, --skip-archives Skip all archives + Skip any files that are treated like archives + + -skf, --skip-files Skip all non-archives + Skip any files that are not treated like archives + + -f=, --filename= Set the external name of the DAT + Set the external filename for the output DAT(s) + + -n=, --name= Set the internal name of the DAT + Set the name header field for the output DAT(s) + + -de=, --description= Set the description of the DAT + Set the description header field for the output DAT(s) + + -r=, --root= Set a new rootdir + Set the rootdir (as used by SuperDAT mode) for the output DAT(s). + + -c=, --category= Set the category of the DAT + Set the category header field for the output DAT(s) + + -v=, --version= Set the version of the DAT + Set the version header field for the output DAT(s) + + -da=, --date= Set a new date + Set the date header field for the output DAT(s) + + -au=, --author= Set the author of the DAT + Set the author header field for the output DAT(s) + + -em=, --email= Set a new email of the DAT + Set the email header field for the output DAT(s) + + -hp=, --homepage= Set a new homepage of the DAT + Set the homepage header field for the output DAT(s) + + -u=, --url= Set a new URL of the DAT + Set the URL header field for the output DAT(s) + + -co=, --comment= Set a new comment of the DAT + Set the comment header field for the output DAT(s) + + -h=, --header= Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -sd, --superdat Enable SuperDAT creation + Set the type flag to "SuperDAT" for the output DAT as well as + preserving the directory structure of the inputted folder, if + applicable. + + -fm=, --forcemerging= Set force merging + Set the forcemerging tag to the given value. + Possible values are: None, Split, Device, Merged, Nonmerged, Full + + -fn=, --forcenodump= Set force nodump + Set the forcenodump tag to the given value. + Possible values are: None, Obsolete, Required, Ignore + + -fp=, --forcepacking= Set force packing + Set the forcepacking tag to the given value. + Possible values are: None, Zip, Unzip, Partial, Flat + + -ef=, --exclude-field= Exclude a game/rom field from outputs + Exclude any valid item or machine field from outputs. Examples + include: romof, publisher, and offset. + + -1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per user-defined region + This allows users to input a list of regions to use to filter on in + order so only one game from each set of parent and clones will be + included. This requires either cloneof or romof tags to function + properly. + + -reg=, --region= Add a region for 1G1R + Add a region (in order) for use with 1G1R filtering. If this is + not supplied, then by default, only parent sets will be included + in the output. Multiple instances of this flag are allowed. + + -orpg, --one-rom-per-game Try to ensure each rom has its own game + In some cases, it is beneficial to have every rom put into its own + output set as a subfolder of the original parent. This flag enables + outputting each rom to its own game for this purpose. + + -sds, --scene-date-strip Remove date from scene-named sets + If this flag is enabled, sets with "scene" names will have the date + removed from the beginning. For example "01.01.01-Game_Name-GROUP" + would become "Game_Name-Group". + + -ab, --add-blank-files Output blank files for folders + If this flag is set, then blank entries will be created for each of + the empty directories in the source. This is useful for tools that + require all folders be accounted for in the output DAT. + + -ad, --add-date Add dates to items, where possible + If this flag is set, then the Date will be appended to each file + information in the output DAT. The output format is standardized as + "yyyy/MM/dd HH:mm:ss". + + -ini=, --extra-ini= Apply a MAME INI for given field(s) + Apply any valid MAME INI for any valid field in the DatFile. Inputs + are of the form 'Field:path\to\ini'. Multiple instances of this flag + are allowed. + + -fi=, --filter= Filter a game/rom field with the given value(s) + Filter any valid item or machine field from inputs. Filters are input + in the form 'key=value' or 'key!=value', where the '!' signifies 'not + matching'. Numeric values may also prefix the 'value' with '>', '<', + or '=' accordingly. Key examples include: romof, category, and game. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters + If filter or exclude by game name is used, this flag will allow those + filters to be checked against the romof and cloneof tags as well. + This can allow for more advanced set-building, especially in + arcade-based sets. + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + ss, sort Sort inputs by a set of DATs + This feature allows the user to quickly rebuild based on a supplied DAT + file(s). By default all files will be rebuilt to uncompressed folders in + the output directory. + + -dat=, --dat= Input DAT to be used + User-supplied DAT for use in all operations. Multiple instances of + this flag are allowed. + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -dep, --depot Assume directories are Romba depots + Normally, input directories will be treated with no special format. + If this flag is used, all input directories will be assumed to be + Romba-style depots. + + -depd=, --depot-depth= Set depth of depot for inputs + Optionally, set the depth of input depots. Defaults to 4 deep + otherwise. + + -del, --delete Delete fully rebuilt input files + Optionally, the input files, once processed and fully matched, can be + deleted. This can be useful when the original file structure is no + longer needed or if there is limited space on the source drive. + + -in, --inverse Rebuild only files not in DAT + Instead of the normal behavior of rebuilding using a DAT, this flag + allows the user to use the DAT as a filter instead. All files that + are found in the DAT will be skipped and everything else will be + output in the selected format. + + -qs, --quick Enable quick scanning of archives + For all archives, if this flag is enabled, it will only use the + header information to get the archive entries' file information. The + upside to this is that it is the fastest option. On the downside, it + can only get the CRC and size from most archive formats, leading to + possible issues. + + -caf, --aaruformats-as-files Treat AaruFormats as files + Normally, AaruFormats would be processed using their internal hash to + compare against the input DATs. This flag forces all AaruFormats to + be treated like regular files. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -ad, --add-date Add dates to items, where possible + If this flag is set, then the Date will be appended to each file + information in the output DAT. The output format is standardized as + "yyyy/MM/dd HH:mm:ss". + + -ind, --individual Process input DATs individually + In cases where DATs would be processed in bulk, this flag allows them + to be processed on their own instead. + + -t7z, --torrent-7zip Enable Torrent7Zip output + Instead of outputting the files to folder, files will be rebuilt to + Torrent7Zip (T7Z) files. This format is based on the LZMA container + format 7Zip, but with custom header information. This is currently + unused by any major application. Currently does not produce proper + Torrent-compatible outputs. + + -tar, --tar Enable Tape ARchive output + Instead of outputting the files to folder, files will be rebuilt to + Tape ARchive (TAR) files. This format is a standardized storage + archive without any compression, usually used with other compression + formats around it. It is widely used in backup applications and + source code archives. + + -tgz, --torrent-gzip Enable Torrent GZip output + Instead of outputting the files to folder, files will be rebuilt to + TorrentGZ (TGZ) files. This format is based on the GZip archive + format, but with custom header information and a file name replaced + by the SHA-1 of the file inside. This is primarily used by external + tool Romba (https://github.com/uwedeportivo/romba), but may be used + more widely in the future. + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to + and from a Romba-style depot. This also implies TorrentGZ input + and output for physical files. Where appropriate, Romba depot + files will be created as well. + + -depr=, --romba-depth= Set depth of depot for outputs + Optionally, set the depth of output depots. Defaults to 4 + deep otherwise. + + -tzip, --torrent-zip Enable Torrent Zip output + Instead of outputting files to folder, files will be rebuilt to + TorrentZip (TZip) files. This format is based on the ZIP archive + format, but with custom header information. This is primarily used by + external tool RomVault (http://www.romvault.com/) and is already + widely used. + + -h=, --header= Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -dfm, --dat-full-merged Create fully merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag while also performing deduplication + within a parent. This is incompatible with the other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + + -ud, --update-dat Output updated DAT to output directory + Once the files that were able to rebuilt are taken care of, a DAT of + the files that could not be matched will be output to the output + directory. + + sp, split Split input DATs by a given criteria + This feature allows the user to split input DATs by a number of different + possible criteria. See the individual input information for details. More + than one split type is allowed at a time. + + -ot=, --output-type= Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + ado, archive - Archive.org file list + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md2 - MD2 + md4 - MD4 + md5 - MD5 + msx, openmsx - openMSX Software List + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sj, sabrejson - SabreJSON + sx, sabrexml - SabreDAT XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + smdb, everdrive - Everdrive SMDB + sl, softwarelist - MAME Software List XML + spamsum - SpamSum + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -dpc, --deprecated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. + + -es, --extension Split DAT(s) by two file extensions + For a DAT, or set of DATs, allow for splitting based on a list of + input extensions. This can allow for combined DAT files, such as + those combining two separate systems, to be split. Files with any + extensions not listed in the input lists will be included in both + outputted DAT files. + + -exta=, --exta= Set extension to be included in first DAT + Set the extension to be used to populate the first DAT. Multiple + instances of this flag are allowed. + + -extb=, --extb= Set extension to be included in second DAT + Set the extension to be used to populate the second DAT. Multiple + instances of this flag are allowed. + + -hs, --hash Split DAT(s) or folder by best-available hashes + For a DAT, or set of DATs, allow for splitting based on the best + available hash for each file within. The order of preference for the + outputted DATs is as follows: Nodump, SHA-512, SHA-384, SHA-256, + SHA-1, MD5, MD4, MD2, CRC (or worse). + + -ls, --level Split a SuperDAT or folder by lowest available level + For a DAT, or set of DATs, allow for splitting based on the lowest + available level of game name. That is, if a game name is + top/mid/last, then it will create an output DAT for the parent + directory "mid" in a folder called "top" with a game called "last". + + -s, --short Use short output names + Instead of using ClrMamePro-style long names for DATs, use just + the name of the folder as the name of the DAT. This can be used + in conjunction with --base to output in the format of "Original + Name (Name)" instead. + + -ba, --base Use source DAT as base name for outputs + If splitting an entire folder of DATs, some output files may be + normally overwritten since the names would be the same. With this + flag, the original DAT name is used in the output name, in the + format of "Original Name(Dir - Name)". This can be used in + conjunction with --short to output in the format of "Original + Name (Name)" instead. + + -szs, --size Split DAT(s) or folder by file sizes + For a DAT, or set of DATs, allow for splitting based on the sizes of + the files, specifically if the type is a Rom (most item types don't + have sizes). + + -rad=, --radix= Set the midpoint to split at + Set the size at which all roms less than the size are put in the + first DAT, and everything greater than or equal goes in the + second. + + -tis, --total-size Split DAT(s) or folder by total game sizes + For a DAT, or set of DATs, allow for splitting based on the combined + sizes of the games, splitting into individual chunks. + + -cs=, --chunk-size= Set a chunk size to output + Set the total game size to cut off at for each chunked DAT. It is + recommended to use a sufficiently large size such as 1GB or else + you may run into issues, especially if a single game could be + larger than the size provided. + + -ts, --type Split DAT(s) or folder by file types (rom/disk) + For a DAT, or set of DATs, allow for splitting based on the types of + the files, specifically if the type is a rom or a disk. + + st, stats Get statistics on all input DATs + This will output by default the combined statistics for all input DAT + files. + + The stats that are outputted are as follows: + - Total uncompressed size + - Number of games found + - Number of roms found + - Number of disks found + - Items that include a CRC + - Items that include a MD5 + - Items that include a SHA-1 + - Items that include a SHA-256 + - Items that include a SHA-384 + - Items that include a SHA-512 + - Items with Nodump status + + -srt=, --report-type= Output statistics to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + csv - Standardized Comma-Separated Value + html - HTML webpage + ssv - Standardized Semicolon-Separated Value + text - Generic textfile + tsv - Standardized Tab-Separated Value + + -f=, --filename= Set the external name of the DAT + Set the external filename for the output DAT(s) + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -bc, --baddump-column Add baddump stats to output + Add a new column or field for counting the number of baddumps in the + DAT. + + -nc, --nodump-column Add statistics for nodumps to output + Add a new column or field for counting the number of nodumps in the + DAT. + + -ind, --individual Process input DATs individually + In cases where DATs would be processed in bulk, this flag allows them + to be processed on their own instead. + + ud, update Update and manipulate DAT(s) + This is the multitool part of the program, allowing for almost every + manipulation to a DAT, or set of DATs. This is also a combination of many + different programs that performed DAT manipulation that work better + together. + + -ot=, --output-type= Output DATs to a specified format + Add outputting the created DAT to known format. Multiple instances of + this flag are allowed. + + Possible values are: + all - All available DAT types + ado, archive - Archive.org file list + am, attractmode - AttractMode XML + cmp, clrmamepro - ClrMamePro + csv - Standardized Comma-Separated Value + dc, doscenter - DOSCenter + lr, listrom - MAME Listrom + lx, listxml - MAME Listxml + miss, missfile - GoodTools Missfile + md2 - MD2 + md4 - MD4 + md5 - MD5 + msx, openmsx - openMSX Software List + ol, offlinelist - OfflineList XML + rc, romcenter - RomCenter + sj, sabrejson - SabreJSON + sx, sabrexml - SabreDAT XML + sfv - SFV + sha1 - SHA1 + sha256 - SHA256 + sha384 - SHA384 + sha512 - SHA512 + smdb, everdrive - Everdrive SMDB + sl, softwarelist - MAME Software List XML + spamsum - SpamSum + ssv - Standardized Semicolon-Separated Value + tsv - Standardized Tab-Separated Value + xml, logiqx - Logiqx XML + + -pre=, --prefix= Set prefix for all lines + Set a generic prefix to be prepended to all outputted lines. + + Some special strings that can be used: + - %game% / %machine% - Replaced with the Game/Machine name + - %name% - Replaced with the Rom name + - %manufacturer% - Replaced with game Manufacturer + - %publisher% - Replaced with game Publisher + - %category% - Replaced with game Category + - %crc% - Replaced with the CRC + - %md2% - Replaced with the MD2 + - %md4% - Replaced with the MD4 + - %md5% - Replaced with the MD5 + - %sha1% - Replaced with the SHA-1 + - %sha256% - Replaced with the SHA-256 + - %sha384% - Replaced with the SHA-384 + - %sha512% - Replaced with the SHA-512 + - %size% - Replaced with the size + + -post=, --postfix= Set postfix for all lines + Set a generic postfix to be appended to all outputted lines. + + Some special strings that can be used: + - %game% / %machine% - Replaced with the Game/Machine name + - %name% - Replaced with the Rom name + - %manufacturer% - Replaced with game Manufacturer + - %publisher% - Replaced with game Publisher + - %category% - Replaced with game Category + - %crc% - Replaced with the CRC + - %md2% - Replaced with the MD2 + - %md4% - Replaced with the MD4 + - %md5% - Replaced with the MD5 + - %sha1% - Replaced with the SHA-1 + - %sha256% - Replaced with the SHA-256 + - %sha384% - Replaced with the SHA-384 + - %sha512% - Replaced with the SHA-512 + - %size% - Replaced with the size + + -q, --quotes Double-quote each item + This flag surrounds the item by double-quotes, not including the + prefix or postfix. + + -r, --roms Output roms to miss instead of sets + By default, the outputted file will include the name of the game + so this flag allows for the name of the rom to be output instead. + [Missfile only] + + -gp, --game-prefix Add game name as a prefix + This flag allows for the name of the game to be used as a prefix + to each file. + + -ae=, --add-extension= Add an extension to each item + Add a postfix extension to each full item name. + + -rep=, --replace-extension= Replace all extensions with specified + When an extension exists, replace it with the provided instead. + + -rme, --remove-extensions Remove all extensions from all items + For each item, remove the extension. + + -ro, --romba Treat like a Romba depot (requires SHA-1) + This flag allows reading and writing of DATs and output files to + and from a Romba-style depot. This also implies TorrentGZ input + and output for physical files. Where appropriate, Romba depot + files will be created as well. + + -depr=, --romba-depth= Set depth of depot for outputs + Optionally, set the depth of output depots. Defaults to 4 + deep otherwise. + + -dpc, --deprecated Output 'game' instead of 'machine' + By default, Logiqx XML DATs output with the more modern "machine" + tag for each set. This flag allows users to output the older + "game" tag instead, for compatibility reasons. [Logiqx only] + + -f=, --filename= Set the external name of the DAT + Set the external filename for the output DAT(s) + + -n=, --name= Set the internal name of the DAT + Set the name header field for the output DAT(s) + + -de=, --description= Set the description of the DAT + Set the description header field for the output DAT(s) + + -r=, --root= Set a new rootdir + Set the rootdir (as used by SuperDAT mode) for the output DAT(s). + + -c=, --category= Set the category of the DAT + Set the category header field for the output DAT(s) + + -v=, --version= Set the version of the DAT + Set the version header field for the output DAT(s) + + -da=, --date= Set a new date + Set the date header field for the output DAT(s) + + -au=, --author= Set the author of the DAT + Set the author header field for the output DAT(s) + + -em=, --email= Set a new email of the DAT + Set the email header field for the output DAT(s) + + -hp=, --homepage= Set a new homepage of the DAT + Set the homepage header field for the output DAT(s) + + -u=, --url= Set a new URL of the DAT + Set the URL header field for the output DAT(s) + + -co=, --comment= Set a new comment of the DAT + Set the comment header field for the output DAT(s) + + -h=, --header= Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -sd, --superdat Enable SuperDAT creation + Set the type flag to "SuperDAT" for the output DAT as well as + preserving the directory structure of the inputted folder, if + applicable. + + -fm=, --forcemerging= Set force merging + Set the forcemerging tag to the given value. + Possible values are: None, Split, Device, Merged, Nonmerged, Full + + -fn=, --forcenodump= Set force nodump + Set the forcenodump tag to the given value. + Possible values are: None, Obsolete, Required, Ignore + + -fp=, --forcepacking= Set force packing + Set the forcepacking tag to the given value. + Possible values are: None, Zip, Unzip, Partial, Flat + + -ef=, --exclude-field= Exclude a game/rom field from outputs + Exclude any valid item or machine field from outputs. Examples + include: romof, publisher, and offset. + + -1g1r, --one-game-per-region [EXPERIMENTAL] Try to ensure one game per user-defined region + This allows users to input a list of regions to use to filter on in + order so only one game from each set of parent and clones will be + included. This requires either cloneof or romof tags to function + properly. + + -reg=, --region= Add a region for 1G1R + Add a region (in order) for use with 1G1R filtering. If this is + not supplied, then by default, only parent sets will be included + in the output. Multiple instances of this flag are allowed. + + -orpg, --one-rom-per-game Try to ensure each rom has its own game + In some cases, it is beneficial to have every rom put into its own + output set as a subfolder of the original parent. This flag enables + outputting each rom to its own game for this purpose. + + -sds, --scene-date-strip Remove date from scene-named sets + If this flag is enabled, sets with "scene" names will have the date + removed from the beginning. For example "01.01.01-Game_Name-GROUP" + would become "Game_Name-Group". + + -keg, --keep-empty-games Keep originally empty sets from the input(s) + Normally, any sets that are considered empty will not be included in + the output, this flag allows these empty sets to be added to the + output. + + -clean, --clean Clean game names according to WoD standards + Game names will be sanitized to remove what the original WoD + standards deemed as unneeded information, such as parenthesized or + bracketed strings. + + -ru, --remove-unicode Remove unicode characters from names + By default, the character set from the original file(s) will be used + for item naming. This flag removes all Unicode characters from the + item names, machine names, and machine descriptions. + + -dan, --description-as-name Use description instead of machine name + By default, all DATs are converted exactly as they are input. + Enabling this flag allows for the machine names in the DAT to be + replaced by the machine description instead. In most cases, this will + result in no change in the output DAT, but a notable example would be + a software list DAT where the machine names are generally + DOS-friendly while the description is more complete. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -dfm, --dat-full-merged Create fully merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag while also performing deduplication + within a parent. This is incompatible with the other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + + -trim, --trim Trim file names to fit NTFS length + In the cases where files will have too long a name, this allows for + trimming the name of the files to the NTFS maximum length at most. + + -rd=, --root-dir= Set the root directory for calc + In the case that the files will not be stored from the root + directory, a new root can be set for path length calculations. + + -si, --single-set All game names replaced by '!' + This is useful for keeping all roms in a DAT in the same archive or + folder. + + -dd, --dedup Enable deduping in the created DAT + For all outputted DATs, allow for hash deduping. This makes sure that + there are effectively no duplicates in the output files. Cannot be + used with game dedup. + + -gdd, --game-dedup Enable deduping within games in the created DAT + For all outputted DATs, allow for hash deduping but only within the + games, and not across the entire DAT. This makes sure that there are + effectively no duplicates within each of the output sets. Cannot be + used with standard dedup. + + -m, --merge Merge the input DATs + By default, all DATs are processed individually with the + user-specified flags. With this flag enabled, all of the input DATs + are merged into a single output. This is best used with the dedup + flag. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -di, --diff-all Create diffdats from inputs (all standard outputs) + By default, all DATs are processed individually with the + user-specified flags. With this flag enabled, input DATs are diffed + against each other to find duplicates, no duplicates, and only in + individuals. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -did, --diff-duplicates Create diffdat containing just duplicates + All files that have duplicates outside of the original DAT are + included. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -dii, --diff-individuals Create diffdats for individual DATs + All files that have no duplicates outside of the original DATs are + put into DATs that are named after the source DAT. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -din, --diff-no-duplicates Create diffdat containing no duplicates + All files that have no duplicates outside of the original DATs are + included. + + -b, --no-automatic-date Don't include date in file name + Normally, the DAT will be created with the date in the file name + in brackets. This flag removes that instead of the default. + + -dag, --diff-against Diff all inputs against a set of base DATs + This flag will enable a special type of diffing in which a set of + base DATs are used as a comparison point for each of the input DATs. + This allows users to get a slightly different output to cascaded + diffing, which may be more useful in some cases. This is heavily + influenced by the diffing model used by Romba. + + -bd=, --base-dat= Add a base DAT for processing + Add a DAT or folder of DATs to the base set to be used for all + operations. Multiple instances of this flag are allowed. + + -bg, --by-game Diff against by game instead of hashes + By default, diffing against uses hashes to determine similar + files. This flag enables using using each game as a comparision + point instead. + + -br, --base-replace Replace from base DATs in order + By default, no item names are changed except when there is a merge + occurring. This flag enables users to define a DAT or set of base + DATs to use as "replacements" for all input DATs. Note that the first + found instance of an item in the base DAT(s) will be used and all + others will be discarded. If no additional flag is given, it will + default to updating names. + + -bd=, --base-dat= Add a base DAT for processing + Add a DAT or folder of DATs to the base set to be used for all + operations. Multiple instances of this flag are allowed. + + -uf=, --update-field= Update a game/rom field from base DATs + Update any valid item or machine field from base DAT(s). Examples + include: romof, publisher, and offset. + + -ons, --only-same Only update description if machine name matches description + Normally, updating the description will always overwrite if + the machine names are the same. With this flag, descriptions + will only be overwritten if they are the same as the machine + names. + + -rbr, --reverse-base-replace Replace item names from base DATs in reverse + By default, no item names are changed except when there is a merge + occurring. This flag enables users to define a DAT or set of base + DATs to use as "replacements" for all input DATs. Note that the first + found instance of an item in the last base DAT(s) will be used and + all others will be discarded. If no additional flag is given, it will + default to updating names. + + -bd=, --base-dat= Add a base DAT for processing + Add a DAT or folder of DATs to the base set to be used for all + operations. Multiple instances of this flag are allowed. + + -uf=, --update-field= Update a game/rom field from base DATs + Update any valid item or machine field from base DAT(s). Examples + include: romof, publisher, and offset. + + -ons, --only-same Only update description if machine name matches description + Normally, updating the description will always overwrite if + the machine names are the same. With this flag, descriptions + will only be overwritten if they are the same as the machine + names. + + -dc, --diff-cascade Enable cascaded diffing + This flag allows for a special type of diffing in which the first DAT + is considered a base, and for each additional input DAT, it only + leaves the files that are not in one of the previous DATs. This can + allow for the creation of rollback sets or even just reduce the + amount of duplicates across multiple sets. + + -sf, --skip-first-output Skip output of first DAT + In times where the first DAT does not need to be written out a + second time, this will skip writing it. This can often speed up + the output process. + + -drc, --diff-reverse-cascade Enable reverse cascaded diffing + This flag allows for a special type of diffing in which the last DAT + is considered a base, and for each additional input DAT, it only + leaves the files that are not in one of the previous DATs. This can + allow for the creation of rollback sets or even just reduce the + amount of duplicates across multiple sets. + + -sf, --skip-first-output Skip output of first DAT + In times where the first DAT does not need to be written out a + second time, this will skip writing it. This can often speed up + the output process. + + -ini=, --extra-ini= Apply a MAME INI for given field(s) + Apply any valid MAME INI for any valid field in the DatFile. Inputs + are of the form 'Field:path\to\ini'. Multiple instances of this flag + are allowed. + + -fi=, --filter= Filter a game/rom field with the given value(s) + Filter any valid item or machine field from inputs. Filters are input + in the form 'key=value' or 'key!=value', where the '!' signifies 'not + matching'. Numeric values may also prefix the 'value' with '>', '<', + or '=' accordingly. Key examples include: romof, category, and game. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters + If filter or exclude by game name is used, this flag will allow those + filters to be checked against the romof and cloneof tags as well. + This can allow for more advanced set-building, especially in + arcade-based sets. + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -ip, --inplace Write to the input directories, where possible + By default, files are written to the runtime directory (or the output + directory, if set). This flag enables users to write out to the + directory that the DATs originated from. + + ve, verify Verify a folder against DATs + When used, this will use an input DAT or set of DATs to blindly check + against an input folder. The base of the folder is considered the base + for the combined DATs and games are either the directories or archives + within. This will only do a direct verification of the items within and + will create a fixdat afterwards for missing files. + + -dat=, --dat= Input DAT to be used + User-supplied DAT for use in all operations. Multiple instances of + this flag are allowed. + + -dep, --depot Assume directories are Romba depots + Normally, input directories will be treated with no special format. + If this flag is used, all input directories will be assumed to be + Romba-style depots. + + -depd=, --depot-depth= Set depth of depot for inputs + Optionally, set the depth of input depots. Defaults to 4 deep + otherwise. + + -out=, --output-dir= Set output directory + This sets an output folder to be used when the files are created. If + a path is not defined, the runtime directory is used instead. + + -ho, --hash-only Check files by hash only + This sets a mode where files are not checked based on name but rather + hash alone. This allows verification of (possibly) incorrectly named + folders and sets to be verified without worrying about the proper set + structure to be there. + + -qs, --quick Enable quick scanning of archives + For all archives, if this flag is enabled, it will only use the + header information to get the archive entries' file information. The + upside to this is that it is the fastest option. On the downside, it + can only get the CRC and size from most archive formats, leading to + possible issues. + + -h=, --header= Set a header skipper to use, blank means all + Set the header special field for the output DAT(s). In file + rebuilding, this flag allows for either all copier headers (using "") + or specific copier headers by name (such as "fds.xml") to determine + if a file matches or not. + + -caf, --aaruformats-as-files Treat AaruFormats as files + Normally, AaruFormats would be processed using their internal hash to + compare against the input DATs. This flag forces all AaruFormats to + be treated like regular files. + + -ic, --chds-as-files Treat CHDs as regular files + Normally, CHDs would be processed using their internal hash to + compare against the input DATs. This flag forces all CHDs to be + treated like regular files. + + -ind, --individual Process input DATs individually + In cases where DATs would be processed in bulk, this flag allows them + to be processed on their own instead. + + -dm, --dat-merged Force creating merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag. This is incompatible with the + other --dat-X flags. + + -dfm, --dat-full-merged Create fully merged sets + Preprocess the DAT to have parent sets contain all items from the + children based on the cloneof tag while also performing deduplication + within a parent. This is incompatible with the other --dat-X flags. + + -ds, --dat-split Force creating split sets + Preprocess the DAT to remove redundant files between parents and + children based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnm, --dat-non-merged Force creating non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent set based on the romof and cloneof tags. This is incompatible + with the other --dat-X flags. + + -dnd, --dat-device-non-merged Create device non-merged sets + Preprocess the DAT to have child sets contain all items from the + device references. This is incompatible with the other --dat-X flags. + + -df, --dat-full-non-merged Create fully non-merged sets + Preprocess the DAT to have child sets contain all items from the + parent sets based on the cloneof and romof tags as well as device + references. This is incompatible with the other --dat-X flags. + + -ini=, --extra-ini= Apply a MAME INI for given field(s) + Apply any valid MAME INI for any valid field in the DatFile. Inputs + are of the form 'Field:path\to\ini'. Multiple instances of this flag + are allowed. + + -fi=, --filter= Filter a game/rom field with the given value(s) + Filter any valid item or machine field from inputs. Filters are input + in the form 'key=value' or 'key!=value', where the '!' signifies 'not + matching'. Numeric values may also prefix the 'value' with '>', '<', + or '=' accordingly. Key examples include: romof, category, and game. + Additionally, the user can specify an exact match or full C#-style + regex for pattern matching. Multiple instances of this flag are + allowed. + + -ofg, --match-of-tags Allow cloneof and romof tags to match game name filters + If filter or exclude by game name is used, this flag will allow those + filters to be checked against the romof and cloneof tags as well. + This can allow for more advanced set-building, especially in + arcade-based sets. + + v, version Prints version + Prints current program version. ** Section 3.0 - Examples @@ -1231,65 +1267,65 @@ Here are a few usage examples based on features that are commonly used by most users of SabreTools. Thanks to Kludge for most of these suggestions! -- Example 1 -- - Convert a DAT file to XML and put it in a new folder + Convert a DAT file to XML and put it in a new folder - Long form: - SabreTools.exe update --output-type=xml --output-dir==OutDir - Path\To\DatFile.dat + Long form: + SabreTools.exe update --output-type=xml --output-dir==OutDir + Path\To\DatFile.dat - Short form: - SabreTools.exe ud -ox -out=OutDir DatFile.dat Path\To\DatFile.dat + Short form: + SabreTools.exe ud -ox -out=OutDir DatFile.dat Path\To\DatFile.dat -- Example 2 -- - Convert a folder of DAT files to ClrMamePro and strip parent tags - Note: This would output the created files to the SabreTools folder + Convert a folder of DAT files to ClrMamePro and strip parent tags + Note: This would output the created files to the SabreTools folder - Long form: - SabreTools.exe update --output-type=cmp --exclude-of=romof - --exclude-of=sampleof --exclude-of=cloneof Path\To\Dats + Long form: + SabreTools.exe update --output-type=cmp --exclude-of=romof + --exclude-of=sampleof --exclude-of=cloneof Path\To\Dats - Short form: - SabreTools.exe ud -oc -ef=romof --ef=sampleof --ef=cloneof - Path\To\Dats + Short form: + SabreTools.exe ud -oc -ef=romof --ef=sampleof --ef=cloneof + Path\To\Dats -- Example 3 -- - Create an XML DAT from a folder of zipped sets setting a custom name + Create an XML DAT from a folder of zipped sets setting a custom name - Long form: - SabreTools.exe dfd --output-type=xml --name=DatName Path\To\Files + Long form: + SabreTools.exe dfd --output-type=xml --name=DatName Path\To\Files - Short form: - SabreTools.exe d -ox -n=DatName Path\To\Files + Short form: + SabreTools.exe d -ox -n=DatName Path\To\Files -- Example 4 -- - Run a fixdat for a friend based on a couple folders the files can be in - and outputting in TorrentZip format + Run a fixdat for a friend based on a couple folders the files can be in + and outputting in TorrentZip format - Long form: - SabreTools.exe sort --dat=Fix.dat --torrent-zip --output-dir==FixDir - InDir1 InDir2 + Long form: + SabreTools.exe sort --dat=Fix.dat --torrent-zip --output-dir==FixDir + InDir1 InDir2 - Short form: - SabreTools.exe ss -dat=Fix.dat -tzip -out=FixDir InDir2 InDir2 - + Short form: + SabreTools.exe ss -dat=Fix.dat -tzip -out=FixDir InDir2 InDir2 + -- Example 5 -- - Remove all files found in a base set of DATs from another set. This example - is useful for getting ride of cross-set duplicates without touching similar - files in the same set. - - Long form: - SabreTools.exe update --diff-against --base-dat="Path\To\Base" InDr - - Short form: - SabreTools.exe ud -dag -bd="Path\To\Base" InDr + Remove all files found in a base set of DATs from another set. This example + is useful for getting ride of cross-set duplicates without touching similar + files in the same set. + + Long form: + SabreTools.exe update --diff-against --base-dat="Path\To\Base" InDr + + Short form: + SabreTools.exe ud -dag -bd="Path\To\Base" InDr ** Section 4.0 - Contributors -Programmer / Lead: Matt Nadareski (darksabre76) -Additional code: emuLOAD, @tractivo -Testing: emuLOAD, @tractivo, Kludge, Obiwantje, edc -Suggestions: Obiwantje, edc, AcidX, Amiga12, EliUmniCk, Kludge -Based on work by: The Wizard of DATz +Programmer / Lead: Matt Nadareski (darksabre76) +Additional code: emuLOAD, @tractivo +Testing: emuLOAD, @tractivo, Kludge, Obiwantje, edc +Suggestions: Obiwantje, edc, AcidX, Amiga12, EliUmniCk, Kludge +Based on work by: The Wizard of DATz We welcome any contributors for coding, suggestions, optimizations, critisism, heckling, abject anger, praise, and/or apathy. @@ -1414,17 +1450,17 @@ has been a new stable release. -udd, --update-description -> -uf=machine.description, --update-field=machine.description -ugt, --update-game-type -> -uf=machine.type, --update-field=machine.type -uh, --update-hashes -> (-uf=item.crc -uf=item.md5 -uf=item.sha1 -uf=item.sha256 - -uf=item.sha384 -uf=item.sha512 -uf=item.spamsum), (--update-field=item.crc - --update-field=item.md5 --update-field=item.sha1 --update-field=item.sha256 - --update-field=item.sha384 --update-field=item.sha512 --update-field=item.spamsum) + -uf=item.sha384 -uf=item.sha512 -uf=item.spamsum), (--update-field=item.crc + --update-field=item.md5 --update-field=item.sha1 --update-field=item.sha256 + --update-field=item.sha384 --update-field=item.sha512 --update-field=item.spamsum) -um, --update-manu -> -uf=machine.manufacturer, --update-field=machine.manufacturer -um, --update-manufacturer -> -uf=machine.manufacturer, --update-field=machine.manufacturer -un, --update-names -> -uf=item.name, --update-field=item.name -up, --update-parents -> (-uf=machine.cloneof -uf=machine.romof -uf=machine.sampleof), - (--update-field=machine.cloneof --update-field=machine.romof - --update-field=machine.sampleof) + (--update-field=machine.cloneof --update-field=machine.romof + --update-field=machine.sampleof) - uy, --update-year -> -uf=machine.year, --update-field=machine.year -xof, --exclude-of -> (-ef=machine.romof -ef=machine.cloneof -ef=machine.sampleof - -ef=machine.runnable -ef=machine.machinetype), (--exclude-field=machine.romof - --exclude-field=machine.cloneof --exclude-field=machine.sampleof - --exclude-field=machine.runnable --exclude-field=machine.type) \ No newline at end of file + -ef=machine.runnable -ef=machine.machinetype), (--exclude-field=machine.romof + --exclude-field=machine.cloneof --exclude-field=machine.sampleof + --exclude-field=machine.runnable --exclude-field=machine.type) \ No newline at end of file diff --git a/SabreTools/Features/DatFromDir.cs b/SabreTools/Features/DatFromDir.cs index a70b45b1..2ffe8d74 100644 --- a/SabreTools/Features/DatFromDir.cs +++ b/SabreTools/Features/DatFromDir.cs @@ -24,6 +24,8 @@ namespace SabreTools.Features // Hash Features AddFeature(IncludeCrcFlag); + AddFeature(IncludeMd2Flag); + AddFeature(IncludeMd4Flag); AddFeature(IncludeMd5Flag); AddFeature(IncludeSha1Flag); AddFeature(IncludeSha256Flag);