Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

commented Jul 4, 2017

mk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.