# How did PortableApps implement relative paths?

**URL:** <https://gramps.discourse.group/t/how-did-portableapps-implement-relative-paths/1791>\
**Category:** Development\
**Created:** [September 1, 2021, 8:49am UTC](https://gramps.discourse.group/t/how-did-portableapps-implement-relative-paths/1791 "2021-09-01T08:49:07Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![PLegoux](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/plegoux/32/413_2.png) [@PLegoux](https://gramps.discourse.group/u/PLegoux)\
**Post date:** [July 30, 2022, 9:58am UTC](https://gramps.discourse.group/t/how-did-portableapps-implement-relative-paths/1791/5 "2022-07-30T09:58:58Z")

</div>

Continuation of the subject [How did PortableApps implement relative paths?](https://gramps.discourse.group/t/how-did-portableapps-implement-relative-paths/1791) :

> [@emyoulation](#):
>
> Whenever a USB device is plugged into a new system, it is assigned an arbitrary drive letter. But PortableGramps detects its own location upon launch and revises the relative offsets. Then triggers Gramps. And Gramps registers the correct .ini files, plugins, relative media path, database path, and so forth.

Contrary to what @emyoulation said, relative media path does not always work.

[It seems using a linux style path for Media relative path in Gramps preferences](https://www.geneanet.org/forum/viewtopic.php?p=2227753#p2227753), at least for [Gramps PortableApp](https://portableapps.com/apps/education/gramps_portable), is the way to store media path and make it compatible to drive letter change from PC to PC. e.g:

That Windows media style path : **i:\gramps\grampsportable\data\Archive Documents**  
don’t work anymore if drive letter on another PC change from I: to D: or anything else than I:

But this linux style one: **/gramps/grampsportable/data/Archive Documents**  
works fine with the PortableApp on any PC with any drive letter the USB stick is assigned to.

* * *

I’ve just seen @ennoborg [answer to another post](https://gramps.discourse.group/t/relative-paths-for-media/2076/11) very similar to mine

---

_[View the full topic](https://gramps.discourse.group/t/how-did-portableapps-implement-relative-paths/1791)._
