View Single Post
  #8  
Old 30-10-2026, 05:00
RamilNfoliage RamilNfoliage is offline
Registered User
 
Join Date: Jan 2026
Location: Egypt
Posts: 2
Thanks: 18
Thanked 0 Times in 0 Posts
RamilNfoliage is on a distinguished road
Just noticed the .exe just take a single file so I decided to try my luck and my Google-Fu ( Trying to search solutions as batch file/.bat stuff is new to me )
I got up with these 2 .bat files... ( Create the files then insert the code, just so you can know what you are actually using. )
They got a good amount of hours from me today xd ( Had to refactor them too as my initial approach didn't take same-name files into account )

Special thanks to BLACKFIRE69 as his "cls-mcmmt.dll" _Pack.bat file is what I built these 2 upon.

_Pack.bat code:

Code:
@echo off&cd /d "%~dp0"
set "target_folder=%~dp0\Pack"
set "compress_folder=%~dp0\Compressed"
setlocal enabledelayedexpansion
set "SEARCH_FOR=Pack"
set "REPLACE_WITH=Compressed"
set "SEARCH_FOR2=.ogg"
set "REPLACE_WITH2=.oggpre"

if not exist "%compress_folder%" (
    md %~dp0\Compressed
)

if exist "%target_folder%" (
    xcopy "%target_folder%" "%compress_folder%" /E
    for /r "%target_folder%" %%F in (*) do (
        if "%%~xF"==".ogg" oggpre_x64.exe m "%%F" "%compress_folder%\%%~nF".oggpre 0
        set "FILEPATH=%%F"
        call set "MODIFIEDPATH=!FILEPATH:%SEARCH_FOR%=%REPLACE_WITH%!"
        call set "MODIFIEDPATH=!MODIFIEDPATH:%SEARCH_FOR2%=%REPLACE_WITH2%!"
        if "%%~xF"==".ogg" move "%compress_folder%\%%~nF.oggpre" "!MODIFIEDPATH!"
    )
    for /r "%compress_folder%" %%G in (*) do (
        if "%%~xG"==".ogg" del "%%G"
    )
) else (
    echo Pack folder doesn't exist!
    echo Make "Pack" named folder and paste the folders of the .ogg files inside it!
)

echo DONE
pause&exit

_Unpack.bat code:

Code:
@echo off&cd /d "%~dp0"
set "compress_folder=%~dp0\Compressed"
set "unpack_folder=%~dp0\Unpack"
setlocal enabledelayedexpansion
set "SEARCH_FOR=Compressed"
set "REPLACE_WITH=Unpack"
set "SEARCH_FOR2=.oggpre"
set "REPLACE_WITH2=.ogg"

if not exist "%unpack_folder%" (
    md %~dp0\Unpack
)

if exist "%compress_folder%" (
    xcopy "%compress_folder%" "%unpack_folder%" /E
    for /r "%compress_folder%" %%F in (*) do (
        if "%%~xF"==".oggpre" oggpre_x64.exe d "%%F" "%unpack_folder%\%%~nF".ogg 0
        set "FILEPATH=%%F"
        call set "MODIFIEDPATH=!FILEPATH:%SEARCH_FOR%=%REPLACE_WITH%!"
        call set "MODIFIEDPATH=!MODIFIEDPATH:%SEARCH_FOR2%=%REPLACE_WITH2%!"
        if "%%~xF"==".oggpre" move "%unpack_folder%\%%~nF.ogg" "!MODIFIEDPATH!"
    )
    for /r "%unpack_folder%" %%G in (*) do (
        if "%%~xG"==".oggpre" del "%%G"
    )
) else (
    echo Compressed folder doesn't exist!
    echo Uhhh... Why are you unpacking without anything compressed :/
)

echo DONE
pause&exit

Last edited by Joe Forster/STA; 30-10-2026 at 06:17. Reason: use "code" instead to quote code
Reply With Quote