Rom Trimming Batch Script - For use with rom_tool

Discussion in '3DS - Flashcards & Custom Firmwares' started by Pestilence204, Jun 18, 2014.

  1. Pestilence204

    Pestilence204 GBAtemp Fan

    Mar 15, 2014
    I figured this will probably be useful to some people, so I thought I'd post it.

    Using Google, alongside some trial and error, I've created a batch script that can be used to trim all your roms at once.

    for %%x in (*.3ds) do rom_tool -i %%x | find /i "CARD1" 1>nul && rom_tool -t %%x
    It will run on all files with the extension 3ds that are in the same directory as the batch file.
    It will start off by doing rom_tool -i filename.3ds. This command displays the CCI info for the file.
    Next, it searches for the text CARD1 in the output created by that command.
    If it finds the text CARD1, it will run rom_tool -t filename.3ds, which is the command for trimming.

    If the text CARD1 is not found, it will do nothing with the file. This ensures that CARD2 and any future media types will not accidentally be trimmed.

    To use the script simply copy the code into notepad, then save the file with the extension .bat
    put this bat file into the same directory as rom_tool.exe, which can be downloaded here.
    Finally, all the roms you want to trim need to be in the same directory as those 2 files (unless you feel like editing the script to change that).
    Arif and justinkb like this.
  2. justinkb

    justinkb GBAtemp Advanced Fan

    Oct 7, 2012
    Nice. Good job
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice