ALL SCRIPTS REQUIRE HACTOOL IN WINDOWS ENVIRONMENT PATH
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!
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.
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.
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,