Playnite Forums
Calculate Sizes of All Installed Games - Printable Version

+- Playnite Forums (
+-- Forum: Extension Database (
+--- Forum: Generic Extensions (
+--- Thread: Calculate Sizes of All Installed Games (/thread-277.html)

Calculate Sizes of All Installed Games - bburky - 05-21-2020

Calculate Sizes of All Installed Games

This extension calculates the sizes of the `InstallDirectory` of all installed games, creates a CSV spreadsheet and opens it in Excel.

Emulated games may not be correctly supported. If only `GameImagePath` is set and not `InstallDirectory`, no size will be listed. If multiple games are in the same  `InstallDirectory`, the total size of the directory will be listed for both games.

This script uses some pretty simple logic for calculating file sizes (the sum of the file size of each file, recursively). The file size may not be correctly calculated for a number of reasons (weird filesystem things, junction points, NTFS compressed files, etc.) Therefore, the reported size does NOT reflect "Size on disk", it's closer to Windows's "Size" calculation. It might be slow too.

The report is saved as a `game-sizes.csv` file in your Playnite profile's `ExtensionData` folder. The extension automatically launches the file (probably with Excel) after completion.

File sizes are listed in the number of bytes. If you'd like human readable sizes, set a custom number format on the "Size" column in Excel:

[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"

The installation directory of the game is a hyperlink `=HYPERLINK("C:\...")` to allow clicking on the path in Excel.

If you attempt to re-run the extension before closing the file in Excel, you will get an error stating that the file cannot be opened "because it is being used by another process." Close it first before re-running the extension.

Source Code

RE: Calculate Sizes of All Installed Games - DonkeyOatay - 05-21-2020

Thanks a lot. Takes a while when you have as many games as I have, but worked great. Added bonus was where it showed me where I had a few games where the wrong install folder was set in Playnite.