Skip to main content

Overview

The dat command allows you to search, view, and modify metadata for DAT files that have been processed by Datoso. This is useful for managing your DAT collection and customizing DAT properties.

Basic Usage

datoso dat [selection-options] [action-options]

Selection Options

You must specify exactly one selection method to identify which DAT(s) to work with.

Select by DAT Name

-d, --dat-name
string
Select a specific DAT using the format seed:name (e.g., redump:Sony - PlayStation)
Example:
datoso dat --dat-name "redump:Sony - PlayStation"
If the format is incorrect (missing colon), Datoso will perform a fuzzy search on the name field.

Select by Filter

-f, --find
string
Select DATs based on filter criteria in the format field=value or field~=value
Operators:
  • = - Exact match
  • != - Not equal
  • ~= - Regex/fuzzy match
Example:
datoso dat --find "system=PlayStation"
datoso dat --find "name~=Sony"

Select All DATs

-a, --all
flag
Show all DATs in the database
Example:
datoso dat --all

Action Options

Once you’ve selected DAT(s), you can perform various actions on them.

Show Details

-dt, --details
flag
Show detailed information for the selected DAT(s)
Example:
datoso dat --dat-name "redump:Sony - PlayStation" --details
Default fields displayed:
  • name
  • modifier
  • company
  • system
  • seed
  • date
  • path
  • system_type
  • automerge
  • parent

Show Specific Fields

-fi, --fields
string[]
Display only specific fields (space-separated list)
Available fields:
  • name - DAT name
  • modifier - Modifier string
  • company - Company name
  • system - System name
  • seed - Source seed name
  • date - DAT date
  • path - File path
  • system_type - System type
  • full_name - Complete DAT name
  • automerge - Auto-merge parent
  • parent - Parent DAT
  • version - DAT version
  • prefix - Name prefix
  • suffix - Name suffix
  • status - DAT status
  • new_file - New file path
  • file - Original file path
  • mias - MIAs marked
  • static_path - Static path
Example:
datoso dat --all --fields name seed status system

Set a Variable

-s, --set
string
Manually set a variable using the format variable=value
Example:
datoso dat --dat-name "redump:Sony - PlayStation" --set "status=disabled"
datoso dat --dat-name "nointro:Nintendo DS" --set "automerge=redump:Sony - PlayStation"
Value parsing:
  • Numbers are converted to integers
  • true/false (case-insensitive) are converted to boolean
  • none/null (case-insensitive) are converted to None/null

Unset a Variable

-u, --unset
string
Manually unset a variable (set it to null)
Example:
datoso dat --dat-name "redump:Sony - PlayStation" --unset parent

Delete a DAT

--delete
flag
default:"false"
Delete the DAT from the database
Example:
datoso dat --dat-name "redump:Sony - PlayStation" --delete
This only removes the database entry, not the actual DAT file. The DAT will be re-imported if you process the seed again.

Mark MIAs

--mark-mias
flag
default:"false"
Mark MIAs (Missing In Action) for the DAT
Example:
datoso dat --dat-name "redump:Sony - PlayStation" --mark-mias
This command:
  1. Reads the DAT file
  2. Compares against the MIA database
  3. Marks entries as MIA where appropriate

Display Options

Show Only Names

-on, --only-names
flag
Display only the seed:name format, one per line (useful for scripting)
Example:
datoso dat --all --only-names
Output:
redump:Sony - PlayStation
redump:Sony - PlayStation 2
nointro:Nintendo DS
tosec:Commodore 64

Common Workflows

Find DATs by System

datoso dat --find "system=PlayStation" --fields name seed date

Disable a DAT

datoso dat --dat-name "redump:Sony - PlayStation" --set "status=disabled"

Check DAT Status

datoso dat --dat-name "redump:Sony - PlayStation" --fields name status path

View All DATs from a Seed

datoso dat --find "seed=redump"

List All DATs (Names Only)

datoso dat --all --only-names > dats.txt

Set Parent for Deduplication

datoso dat --dat-name "redump:Sony - PlayStation 2 (Demos)" --set "parent=redump:Sony - PlayStation 2"

Mark Multiple DATs as MIA

# Using a filter
datoso dat --find "system=PlayStation" --mark-mias

Output Format

By default, DATs are displayed in a table format using the psql style:
+--------+------------------------+----------+
| seed   | name                   | status   |
+--------+------------------------+----------+
| redump | Sony - PlayStation     | enabled  |
| redump | Sony - PlayStation 2   | enabled  |
+--------+------------------------+----------+

Troubleshooting

DAT Not Found

If a DAT is not found by name:
  1. Verify the seed name is correct
  2. Check if the DAT has been processed: datoso dat --all --only-names
  3. Process the seed if necessary: datoso <seed-name> --process

Invalid Variable Name

If setting a variable fails, check the available fields list above and ensure the variable name matches exactly.

Filter Not Working

Ensure your filter syntax is correct:
  • Use = for exact matches
  • Use ~= for pattern matching
  • Quote values with spaces: --find "name=Sony - PlayStation"

Next Steps

Build docs developers (and LLMs) love