GGPK Defragmenter

This does the job for me. When i quit the game after a patch comes out this optimize PoE. Warning can delete your game file when someting goes wrong but currently works for me.

1. Download GGPK Defragmenter and put in your PoE folder
2. Create a "Client.bat" in your PoE Folder (not Client.bat.txt)
3. Copy Text below and save
4. Start the game via Client.bat (you should replace your Desktop Shortcut with a shortcut to Client.bat Do not copy the file to the Desktop)

@echo off

SET filename="Content.ggpk"
SET last_filename="last.dat"

IF NOT EXIST "ggpk_defragment.exe" (
echo "ggpk_defragment.exe not found"
pause
exit
)

echo Starting PoE
Client.exe

IF EXIST %last_filename% (
set /p mylast=<%last_filename%
) else (
set mylast=0
)

for %%X in (%filename%) do set size=%%~zX&set filetime=%%~tX
if "%mylast%" == "%filetime% " (
echo nothing to do
exit
)

IF EXIST "ShaderCache" (
echo delete ShaderCache
rd /s /q ShaderCache
)
echo optimize Content.ggpk
for /F %%i in ('ggpk_defragment.exe Content.ggpk Content.new.ggpk') do set tmp_log=%%i

IF "%tmp_log%" == "Successfully" (
move /Y Content.new.ggpk Content.ggpk > nul
) ELSE (
echo "%tmp_log%"
echo "Error optimize failed"
pause
exit
)

for %%X in (%filename%) do set size=%%~zX&set filetime=%%~tX
echo |set /p=%filetime% > %last_filename%
IF NOT EXIST %last_filename% (
echo "Error can't save last update date"
pause
exit
)
echo done
Ingame: Soto_DualStrike
GMT +1:00
love this tool, game loads faster and is smaller.
shaved off almost 3g's off my system.

Spoiler

Spoiler
http://imgur.com/X1I9EHp
Portugal ^^
Last edited by MikeNeto on Aug 26, 2013, 5:26:57 PM
"
ignarsoll wrote:
As I can see current usage of the tool is not that friendly for the avarage user. So I changed few lines of code and now it works by double clicking.

Now the tool creates a backup of the Content.ggpk named Content.ggpk.old, then it creates a defragmented copy of it named as Content.ggpk. So there is no additional steps in the process, after running the game without a problem you could delete Content.ggpk.old to save some space.

Windows executable - Source

Usage:
1- Copy the tool to your Path of Exile directory.
2- Double click it and wait for it to finish
3- Run the game to check if everything is working fine.
4- If so delete Content.ggpk.old to save some space.

Spoiler
This was the first time I had my hands on a ruby code. Thankfully I only changed 2-3 lines of code but if there is a way that it could be done more efficiently. Experienced ruby developers should feel free to make appropriate changes.



Thanks ignarsoll, you saved me from having to manually do all this labor just for the possibility of messing up ( Of course I scanned the exe file, you can never be too careful) because I misread something. Thank you again, for posting up a patch to defrag the game.
Sometimes you can take the game out of the garage but you can't take the garage out of the game.
- raics, 06.08.2016

"
unsane wrote:
"
Odoakar wrote:
Your method is quite simple.

1. Go to your PoE folder and put the defragmenter file there. Copy the path name to the folder (E:\Program Files (x86)\Grinding Gear Games\Path of Exile in my case).
2. Start-Run-Cmd. If you don't have Run on Win7, google 'how to enable Run on win 7'.
3. E: is my drive with PoE, replace the letter with your disk character

C:\Users\..\:>E:
E:\> cd E:\Program Files (x86)\Grinding Gear Games\Path of Exile

(right click and paste the path)

E:\Program Files (x86)\Grinding Gear Games\Path of Exile> ggpk_defragment.exe content.ggpk content2.ggpk

Confirm and wait.

After it's done, just rename the files as suggested by Nagpur.

There's an even easier way to do this. Rewritten version:

1. Go to your PoE folder and put the defragmenter file there. (E:\Program Files (x86)\Grinding Gear Games\Path of Exile in my case).
2. Start-Run-Cmd. If you don't have Run on Win7, google 'how to enable Run on win 7'.
3. Drag and drop the ggpk_defragment.exe file onto the command window.
4. Hit spacebar.
5. Drag and drop the Content.ggpk file onto the command window.
6. Hit spacebar.
7. Drag and drop the Content.ggpk file onto the command window.
8. Hit the left arrow key and add a 2, so it says Content.ggpk2

Hit enter and wait.

After it's done, just rename the files as suggested by Nagpur.



GG ty

work for me
my english sux.
"
ignarsoll wrote:
As I can see current usage of the tool is not that friendly for the avarage user. So I changed few lines of code and now it works by double clicking.

Now the tool creates a backup of the Content.ggpk named Content.ggpk.old, then it creates a defragmented copy of it named as Content.ggpk. So there is no additional steps in the process, after running the game without a problem you could delete Content.ggpk.old to save some space.

Windows executable - Source

Usage:
1- Copy the tool to your Path of Exile directory.
2- Double click it and wait for it to finish
3- Run the game to check if everything is working fine.
4- If so delete Content.ggpk.old to save some space.

Spoiler
This was the first time I had my hands on a ruby code. Thankfully I only changed 2-3 lines of code but if there is a way that it could be done more efficiently. Experienced ruby developers should feel free to make appropriate changes.

Virustotal gives the following positive (from McAfee): Heuristic.LooksLike.Win32.Suspicious.N

The rest of the avs find nothing suspicious.

Iirc the old defragger didnt return any positives so i thought id point out the change.
IGN: KoTao
"
KoTao wrote:

Virustotal gives the following positive (from McAfee): Heuristic.LooksLike.Win32.Suspicious.N

The rest of the avs find nothing suspicious.

Iirc the old defragger didnt return any positives so i thought id point out the change.



Weird, McAfee did not give me positive.
Sometimes you can take the game out of the garage but you can't take the garage out of the game.
- raics, 06.08.2016

Last edited by JohnNamikaze on Aug 28, 2013, 12:28:27 AM
"
JohnNamikaze wrote:
"
KoTao wrote:

Virustotal gives the following positive (from McAfee): Heuristic.LooksLike.Win32.Suspicious.N

The rest of the avs find nothing suspicious.

Iirc the old defragger didnt return any positives so i thought id point out the change.



Weird, McAfee did not give me positive.

There are two McAfee apps used by the scanner; only the one with heuristic analysis gave the positive, so theres a better than average chance that its false, but its good to bring this sort of thing to light just the same.
IGN: KoTao
"
KoTao wrote:

There are two McAfee apps used by the scanner; only the one with heuristic analysis gave the positive, so theres a better than average chance that its false, but its good to bring this sort of thing to light just the same.



Alright.
Sometimes you can take the game out of the garage but you can't take the garage out of the game.
- raics, 06.08.2016

This should stop the occasional FPS spike
Spoiler

from 6.8gb to 3.9gb

sweet :)

Report Forum Post

Report Account:

Report Type

Additional Info