Posted February 27, 2019
NZPaul: if i were to put everything into a batch file to be run regularly, say once per month, in terms of having a complete offline archive of my games, are there any issues with the following (assuming i've already previously logged in once)? This is based on gogrepo.py being located in d:\gogrepo-master\ and my downloaded games being in d:\gogrepo-master\games\. The reason for the repeated download is my internet connection is a bit flaky.
d:
cd gogrepo-master
gogrepo.py update -os windows -lang en -updateonly
gogrepo.py update -os windows -lang en -skipknown
gogrepo.py download games
gogrepo.py verify games -delete
gogrepo.py download games
I am personally using the dev-branch version (gogrepoc-dev), apparently it has more fixes and stuff and is more up to date. I haven't checked the exact changes. d:
cd gogrepo-master
gogrepo.py update -os windows -lang en -updateonly
gogrepo.py update -os windows -lang en -skipknown
gogrepo.py download games
gogrepo.py verify games -delete
gogrepo.py download games
I presume "games" is a subfolder under gogrepo-master, under which all your GOG games are? Yes I think you should use the clean command too, otherwise your game installer subfolders will grow and grow, keeping also all the old files there. "verify -delete" will not remove those obsolete files, as it only checks files it recognizes (the latest files), and deletes them only if they fail the integrity check.
Also unless you tend to remove your manifest file (in which case the update command will create it from scratch), I am unsure if "-updateonly" and "-skipknown" really matter nowadays (it has always been a bit unclear to me what their EXACT purpose is, in the big picture). To me it seems gogrepo will skip most of the files on your existing manifest file anyway, not sure what purpose those options have anymore (kalanyr can explain I guess).
Here is an example of my gog.bat file which makes sure I have a updated, clean and verified set of GOG game installers (English Windows versions only; as said I am using the dev version, gogrepoc.py):
python gogrepoc.py update -lang en -os windows
python gogrepoc.py clean e:\gog\
python gogrepoc.py download e:\gog\
python gogrepoc.py verify e:\gog\
e:\gog\ is the subdirectory of the external 5TB USB hard drive (always E: drive for me) where my GOG game installers are.
The clean command moves any old and obsolete files under the !orphaned directory, before I even download. I guess it doesn't matter much if you do clean before or after downloading new files. Having it before downloading new files, at least if you notice that you don't have enough space to download all your new and changed games, you have time to manually delete any obsolete files that you don't need, before running out of space.
I don't use the delete option with verify, I just check from the report which files failed verification and check them manually, and remove if necessary. I guess if you want it to be as automated as possible, then yes verify .delete and then run download again (to get any deleted files again).
You just need to occasionally remember to check !orphaned directory if you want to delete old files from there (or keep them), but if you feel certain you won't ever miss any old files, I guess you can delete all the files inside !orphaned (just to make sure that directory doesn't grow uncontrollably, if you are running out of free space).
If for some reason you need to exit the process (whether it is during update, download or verify; clean doesn't last many seconds anyway as it quickly checks and moves files around), you can exit it with Ctrl-C. Then just run your bat file again, it will quickly go back to the poiint where you left. It will run update, download and verify again, but skip all the things quite fast which were already done before. You'll see when you try it out. :)
Post edited February 27, 2019 by timppu