Skip to content

Instantly share code, notes, and snippets.

@chrmoritz
Last active August 7, 2019 22:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save chrmoritz/c304dead49ce6a38653f to your computer and use it in GitHub Desktop.
Save chrmoritz/c304dead49ce6a38653f to your computer and use it in GitHub Desktop.
Trove extract client script (MIT licensed)
@echo off
if not exist "%~dp0\Trove.exe" (
echo. Error: Couldn't find Trove.exe
echo. Please but this .bat script inside your Trove folder and retry!
echo.&pause&goto:eof
)
echo. This script will extract all client files to the extracted folder.
echo. All current contents of the extracted folder will be overwritten.
echo. Please make backups of your modifications before continuing!
set /p test=Do you want to continue? (y/n)
if not "%test%" == "y" exit
rmdir /Q /S extracted
call:extractFolder "%~dp0"
echo.
echo. Completed extraction of the clientfiles to:
echo. "%~dp0"\extracted
echo.&pause&goto:eof
:extractFolder
for /D %%f in ("%~1*") do (
if not "%%~nf" == "extracted" (
if exist "%~2%%~nf\index.tfi" (
echo. extracting %~2%%~nf
"%~dp0Trove.exe" -tool extractarchive %~2%%~nf extracted\%~2%%~nf
)
call:extractFolder "%~1%%~nf\", "%~2%%~nf\"
)
)
goto:eof
@echo off
if not exist "%~dp0\Trove.exe" (
echo. Error: Couldn't find Trove.exe
echo. Please but this .bat script inside your Trove folder and retry!
exit /B 1
)
rmdir /Q /S extracted
call:extractFolder "%~dp0"
echo.
echo. Completed extraction of the clientfiles to:
echo. "%~dp0"\extracted
exit
:extractFolder
for /D %%f in ("%~1*") do (
if not "%%~nf" == "extracted" (
if exist "%~2%%~nf\index.tfi" (
echo. extracting %~2%%~nf
"%~dp0Trove.exe" -tool extractarchive %~2%%~nf extracted\%~2%%~nf
)
call:extractFolder "%~1%%~nf\", "%~2%%~nf\"
)
)
goto:eof
@TheHackedShadows
Copy link

mk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment