Update IDE portable without losing sketchbook or libraries

I've been using IDE 1.8.13 installed as portable but now I'm getting the "Error compiling for board"

How can I update it to the latest version without losing my sketchbook, installed libraries etc?

  1. Unzip the new version to e.g. the directory IDE.1.8.19 (I assume that that will be the new version).
  2. Copy the portable directory from the old install to the new one.
  3. If you use shortcuts, adjust them.

Did you try to fix it? You're an experienced user as far as I know.

Thanks @sterretje yes I tried to fix it.

Downloaded & unzipped, copied portable folder across,
Opened "blink" example
Error compiling for board Arduino Micro.

Ah - somehow its found a "portable" sketchbook in a different location.
File-prefs change to the right place.
Error compiling for board Arduino Micro.

Move sketchbook to its own folder in the root of the drive; change location in prefs; working. (so far)

Cant get my head around where these folders need to be in a portable install.