ROM Hack Batch Scripts for Windows (to make things easier)

TheExpertNoob

Member
OP
Newcomer
Joined
Mar 25, 2018
Messages
24
Trophies
0
Age
37
XP
223
Country
United States
ALL SCRIPTS REQUIRE HACTOOL IN WINDOWS ENVIRONMENT PATH
rWgiUTN.jpg


Create a new text file and name it "extract_xci.bat" (also you must have "hide known file extensions turned off")
Right click -> Edit (should open notepad) paste which ever script you want. You're welcome to edit it or use it in any applications you want.


First script extracts just the Secure partition of an xci (nca files containing games)... and look! It's a one-liner!
Code:
hactool -txci --securedir="%CD%" "%~1"

When using an xci file, the second script goes further and extracts Section0 (exefs) and Section1 (romfs) into an "extracted" folder with the name of each nca inside that folder, contents inside.
Code:
hactool -txci --securedir="%CD%" "%~1"
if not exist "%CD%\extracted\" mkdir "%CD%\extracted"
for /r %%i in (*.nca) do (
if not exist "%CD%\extracted\%%~nxi" mkdir "%CD%\extracted\%%~nxi"
hactool --section0dir="%CD%\extracted\%%~nxi\ExeFs" "%%i"
hactool --section1dir="%CD%\extracted\%%~nxi\RomFs" "%%i"
)

Usage extract_xci.bat <name of xci>.xci
or
drag-and-drop the xci file over the batch file.

I will soon finish my "Master" script that extracts a folder full of XCIs putting them each in their own folder. (requires a lot of free space)
Anyone is welcome to add their scripts to this thread. If you are sharing a *NIX based script, make note of it or someone is welcome to start their own *Nix thread of scripts.

Possibly more scripts to come.
 
Last edited by TheExpertNoob,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BigOnYa @ BigOnYa:
    You must be north of me, Im in Ohio.. It been storming on off all day here, coming from the north
  • Sicklyboy @ Sicklyboy:
    just barely maybe, more so just dead east.
    I'm in NJ
    +1
  • BigOnYa @ BigOnYa:
    Is weird looking at the radar, it is making a circle
  • Morganna @ Morganna:
    @BigOnYa well, starting with, idk which emulator should i use for switch, i got a gtx 1650, do you know which one would it better for my pc?
  • BigOnYa @ BigOnYa:
    The switch emulators on pc rely on your CPU mostly, and they only use a single core, so GPU not as important as a good CPU. I don't use switch emulator, but many here do, and willing to help.
  • BigOnYa @ BigOnYa:
    @K3Nv2 do you want to chime in, don't you use yuzu or ryujinx? Which do you prefer?
  • BigOnYa @ BigOnYa:
    @Morganna I'd say try them both, and see which work better for your setup, good luck, and have fun!
  • Morganna @ Morganna:
    i tried just yuzu so far, not even played, just open the game to see if it run
    +1
  • Morganna @ Morganna:
    By the way, is there any website you recommend to search for some roms?
  • BigOnYa @ BigOnYa:
    No you are not allowed to discuss them here, against the rules of the site. Sorry. But you can Google Nintendo NSP and there will be a few listed.
  • Morganna @ Morganna:
    @BigOnYa that was actually very helpful, thank you very much
    +1
  • BigOnYa @ BigOnYa:
    Game on!
  • K3Nv2 @ K3Nv2:
    Actually looking forward to that new m&ms song Friday
  • DTApple @ DTApple:
    Water is the Wii Startup Disc of the soul.
  • BigOnYa @ BigOnYa:
    I won't listen till they bring back the purple ones
  • K3Nv2 @ K3Nv2:
    For every Nintendo question that gets asked I'll post a Taylor swift song in return
    +1
  • BigOnYa @ BigOnYa:
    Whatever happened to D12?
  • K3Nv2 @ K3Nv2:
    Split after their friends death but still friends
    +1
  • BakerMan @ BakerMan:
    still waiting on my salsa lmao
    em you lied to us
  • BigOnYa @ BigOnYa:
    I remb that song, i just never knew that was what he was talking bout.
  • a_username_that_is_cool @ a_username_that_is_cool:
    the backwards d looks so weird
  • a_username_that_is_cool @ a_username_that_is_cool:
    like :D or D: is nowhere near as odd as ꓷ:
  • BakerMan @ BakerMan:
    (: is just the text version of 🙃 no matter how much they want me to think it's 🙂
  • K3Nv2 @ K3Nv2:
    emo
    K3Nv2 @ K3Nv2: emo