# Path to project

**URL:** https://discourse.julialang.org/t/path-to-project/85299
**Category:** General Usage
**Created:** [August 4, 2022, 12:16pm UTC](https://discourse.julialang.org/t/path-to-project/85299 "2022-08-04T12:16:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Kruxigt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kruxigt/32/11694_2.png) [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)
#### Post date: [August 4, 2022, 12:16pm UTC](https://discourse.julialang.org/t/path-to-project/85299/1 "2022-08-04T12:16:49Z")

</div>

Hi good folks!

I have tried googling for this for about 4 hours now. How do I get the base path to the current project (that is not a module) in Julia?

Thanks!

---

<div class="post-metadata">

### Author: ![mmiller](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mmiller/32/20805_2.png) [@mmiller](https://discourse.julialang.org/u/mmiller)
#### Post date: [August 4, 2022, 12:18pm UTC](https://discourse.julialang.org/t/path-to-project/85299/2 "2022-08-04T12:18:18Z")

</div>

Does the below do what you want? It returns the file path of the `Project.toml` file of the active project.

```nohighlight
julia> Base.active_project()

```

---

<div class="post-metadata">

### Author: ![Kruxigt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kruxigt/32/11694_2.png) [@Kruxigt](https://discourse.julialang.org/u/Kruxigt)
#### Post date: [August 4, 2022, 12:29pm UTC](https://discourse.julialang.org/t/path-to-project/85299/3 "2022-08-04T12:29:39Z")

</div>

Thanks! That gets me part of the way! By the way, is there any good guide on how to use includes of relative paths within a file structure/project?

Just using pure relative paths in includes uses the current working dir as base path but more useful would be to have a project fixed path as base path, right?

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [August 4, 2022, 12:50pm UTC](https://discourse.julialang.org/t/path-to-project/85299/4 "2022-08-04T12:50:19Z")

</div>

In files you can use something like `joinpath(@ __DIR__ , "../rel/a/tive/path")`, see [Essentials · The Julia Language](https://docs.julialang.org/en/v1/base/base/#Base.@ __DIR__ ).

---

<div class="post-metadata">

### Author: ![bertulli](https://avatars.discourse-cdn.com/v4/letter/b/ecc23a/32.png) [@bertulli](https://discourse.julialang.org/u/bertulli)
#### Post date: [June 15, 2026, 11:17am UTC](https://discourse.julialang.org/t/path-to-project/85299/5 "2026-06-15T11:17:40Z")

</div>

Slightly expanding it, if you have a `Project.toml` up in the tree, this will return the project root directory:

```julia-auto
abspath(Base.active_project(), "..")

```
