Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gather info about a Joomla 2.5+ installation for Windows
@ECHO OFF
REM Sitenaam ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$sitename =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jsitename=%%A
)
)
REM Host ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$host =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jhost=%%A
)
)
REM DB User ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$user =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET juser=%%A
)
)
REM DB Password ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$password =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jpassword=%%A
)
)
REM DB ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$db =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jdb=%%A
)
)
REM DB prefix ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$dbprefix =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jprefix=%%A
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment