Skip to content

Basic Usage Examples

A walkthrough of an example way to sort your ROM collection.

Info

See the igir --help message for a few common examples.

With DATs

Even though Igir can work without DATs, using DATs to sort your collection is the best practice to end up with the most accurate and organized set of ROMs.

First time collection sort

First, you need to download a set of DATs. For these examples I'll assume you downloaded a No-Intro daily P/C XML .zip.

Let's say that you have a directory named ROMs/ that contains ROMs for many different systems, and it needs some organization. To make sure we're alright with the output, we'll have Igir copy these files to a different directory rather than move them. We'll also zip them to reduce disk space & speed up future scans.

igir copy zip test ^
  --dat "No-Intro*.zip" ^
  --input ROMs\ ^
  --output ROMs-Sorted\ ^
  --dir-dat-name
igir copy zip test \
  --dat "No-Intro*.zip" \
  --input ROMs/ \
  --output ROMs-Sorted/ \
  --dir-dat-name
igir copy zip test \
  --dat "No-Intro*.zip" \
  --input ROMs/ \
  --output ROMs-Sorted/ \
  --dir-dat-name

This will organize your ROMs into system-specific subdirectories within ROMs-Sorted/ and name all of your ROMs according to the No-Intro DATs. Because we copied and didn't move the files, no files were deleted from the ROMs/ input directory.

ROMs-Sorted/ then might look something like this:

ROMs-Sorted/
├── Nintendo - Game Boy
│   ├── Pokemon - Blue Version (USA, Europe) (SGB Enhanced).zip
│   └── Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (CGB+SGB Enhanced).zip
├── Nintendo - Game Boy Advance
│   ├── Pokemon - Emerald Version (USA, Europe).zip
│   └── Pokemon - Sapphire Version (USA, Europe) (Rev 2).zip
└── Nintendo - Game Boy Color
    ├── Pokemon - Crystal Version (USA, Europe) (Rev 1).zip
    └── Pokemon Pinball (USA, Australia) (Rumble Version) (SGB Enhanced) (GB Compatible).zip

Info

See the output path options and output path tokens pages for other ways that you can organize your collection.

Subsequent collection sorts

Let's say that we've done the above first time sort and were happy with the results. We can now consider the ROMs-Sorted/ directory to be our "golden" or "primary" collection, as every file in there has been matched to a DAT.

We now have new ROMs that we want to newly merge into our collection, and we want to generate a report of what ROMs are still missing. We also want to "clean" or delete any unknown files that may have made their way into our collection.

igir move zip test clean report ^
  --dat "No-Intro*.zip" ^
  --input ROMs-New\ ^
  --input ROMs-Sorted\ ^
  --output ROMs-Sorted\ ^
  --dir-dat-name
igir move zip test clean report \
  --dat "No-Intro*.zip" \
  --input ROMs-New/ \
  --input ROMs-Sorted/ \
  --output ROMs-Sorted/ \
  --dir-dat-name
igir move zip test clean report \
  --dat "No-Intro*.zip" \
  --input ROMs-New/ \
  --input ROMs-Sorted/ \
  --output ROMs-Sorted/ \
  --dir-dat-name

Any new ROMs in ROMs-New/ that we didn't already have in ROMs-Sorted/ will be moved, and a report will be generated for us.

Note

Note that we're using ROMs-Sorted/ as both an input directory and as the output directory. This is required to ensure the clean command doesn't delete "good" files already in the output directory!

You can always use the --clean-dry-run option to see what files would be deleted without actually deleting them.

ROMs-Sorted/ then might look something like this, with new ROMs added:

ROMs-Sorted/
├── Nintendo - Game Boy
│   ├── Pokemon - Blue Version (USA, Europe) (SGB Enhanced).zip
│   ├── Pokemon - Red Version (USA, Europe) (SGB Enhanced).zip
│   └── Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (CGB+SGB Enhanced).zip
├── Nintendo - Game Boy Advance
│   ├── Pokemon - Emerald Version (USA, Europe).zip
│   ├── Pokemon - Ruby Version (USA, Europe) (Rev 2).zip
│   └── Pokemon - Sapphire Version (USA, Europe) (Rev 2).zip
└── Nintendo - Game Boy Color
    ├── Pokemon - Crystal Version (USA, Europe) (Rev 1).zip
    └── Pokemon Pinball (USA, Australia) (Rumble Version) (SGB Enhanced) (GB Compatible).zip

Flash cart 1G1R

Let's say we've done the above sorting we want to copy some ROMs from ROMs-Sorted/ to a flash cart.

We would prefer having only one copy of every game (1G1R), because we have a preferred language, and so there is less to scroll through to find what game we want. Our flash cart can't read .zip files, so we'll need to extract our ROMs during copying.

Replace the E:\ drive letter with wherever your SD card is:

igir copy extract test clean ^
  --dat "No-Intro*.zip" ^
  --input "ROMs-Sorted\Nintendo - Game Boy" ^
  --output E:\ ^
  --dir-letter ^
  --no-bios ^
  --single ^
  --prefer-language EN ^
  --prefer-region USA,WORLD,EUR,JPN

Replace the /Volumes/FlashCart drive name with whatever your SD card is named:

igir copy extract test clean \
  --dat "No-Intro*.zip" \
  --input "ROMs-Sorted/Nintendo - Game Boy" \
  --output /Volumes/FlashCart/ \
  --dir-letter \
  --no-bios \
  --single \
  --prefer-language EN \
  --prefer-region USA,WORLD,EUR,JPN

Replace the /media/FlashCart path with wherever your SD card is mounted:

igir copy extract test clean \
  --dat "No-Intro*.zip" \
  --input "ROMs-Sorted/Nintendo - Game Boy" \
  --output /media/FlashCart/ \
  --dir-letter \
  --no-bios \
  --single \
  --prefer-language EN \
  --prefer-region USA,WORLD,EUR,JPN

Your flash cart might then look something like this:

/Volumes/FlashCart
└── P
    ├── Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb
    ├── Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb
    └── Pokemon - Yellow Version - Special Pikachu Edition (USA, Europe) (CGB+SGB Enhanced).gb

Info

See the ROM filtering & preference page for other ways that you can filter your collection.

Without DATs

ROM organization is very opinion-based, and your opinion may not match that of DAT groups. To preserve your custom ROM sorting, you can skip providing any DATs by omitting the --dat <path> option.

Note

If your custom ROM sorting includes directories, you will want to provide the --dir-mirror option to preserve the structure.

Extracting or zipping all ROMs

It is possible to extract or zip your ROM files en masse without complicated Bash or Batch scripts, and you can do this without DATs because the root of the filename won't change.

igir move extract test ^
  --input "ROMs\" ^
  --output "ROMs\" ^
  --dir-mirror
igir move extract test \
  --input "ROMs/" \
  --output "ROMs/" \
  --dir-mirror
igir move extract test \
  --input "ROMs/" \
  --output "ROMs/" \
  --dir-mirror

Fixing file extensions

Igir is able to detect more than 50 ROM and archive file types and automatically correct file extensions when needed during writing. See the writing options page for more information.

igir move extract test ^
  --input "ROMs\" ^
  --output "ROMs\" ^
  --dir-mirror ^
  --fix-extension always
igir move extract test \
  --input "ROMs/" \
  --output "ROMs/" \
  --dir-mirror \
  --fix-extension always
igir move extract test \
  --input "ROMs/" \
  --output "ROMs/" \
  --dir-mirror \
  --fix-extension always