Some Steam games don't have cloud backup support, so I'm using a Git repo with a Makefile to create backups of game save files and settings. Because of storage restrictions I've had to create an additional Steam library folder. That is, some of my games are stored in /home/username/.local/share/Steam
, while others are in /mnt/games/SteamLibrary
. I'd like for the Makefile to deal with this automatically, so I don't have to hard code the current install path. In many cases the save folder is within the Steam library, so that's the main question:
How do I get the install directory using either the game ID or name?
I'm not looking for manual solutions like looking through the Steam GUI or slow/brittle solutions like find / -type d -name GAME_ID
. Parsing and looping over the output of steamcmd +library_folder_list +quit
would be horrible, but possible as a last resort.
Bonus question
Some games don't put their saves in the same directory. For example, Hollow Knight saves and settings are in ~/.config/unity3d/Team Cherry/Hollow Knight
. I don't expect Steam knows about this directory, but if it does and you know how to get it, that would certainly be worth a bonus.