Skip to content

DAT From Dir

Matt Nadareski edited this page Sep 19, 2025 · 13 revisions

DAT From Dir (DFD/D2D)

Flags: -d, --d2d, --dfd

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.

Options

Flags Short Description Long Description
-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.
-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 regular 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. See DatFile Formats for more details about supported values.
-dpc, --deprecated Output game instead of machine Requires --output-type=xml. 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.
-ro, --romba Treat like a Romba depot (requires SHA-1) Requires -tgz, --torrent-gzip. 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 Requires -ro, --romba. 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. See Merging Modes for more details about supported values.
-fn=, --forcenodump= Set force nodump Set the forcenodump tag to the given value. See Nodump Modes for more details about supported values.
-fp=, --forcepacking= Set force packing Set the forcepacking tag to the given value. See Packing Modes for more details about supported values.
-ef=, --exclude-field= Exclude a game/rom field from outputs Exclude any valid item or machine field from outputs. See Fields for more information.
-1g1r, --one-game-per-region 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 Requires -1g1r, --one-game-per-region. 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.
-cf, --copy-files Copy files to the temp directory before parsing If this flag is set, then all files that are going to be parsed are moved to the temporary directory before being hashed. This can be helpful in cases where the temp folder is located on an SSD and the user wants to take advantage of this.
-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. See Copier Headers for more information.
-ini=, --extra-ini= Apply a MAME INI for given field Apply any valid MAME INI for any valid field in the DatFile. Multiple instances of this flag are allowed. See Extras for more information.
-fi=, --filter= Filter a game/rom field with the given value(s) Filter any valid item or machine field from inputs. See Filters for more information.
-ofg, --match-of-tags Allow cloneof and romof tags to match game name filters Requires -fi=, --filter=. 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.

Examples

Create an XML DAT from a folder of zipped sets setting a custom name

--dfd --output-type=xml --name=DatName Path\To\Files

Clone this wiki locally