# Unexpected behaviour of include

**URL:** <https://discourse.julialang.org/t/unexpected-behaviour-of-include/47589>\
**Category:** General Usage\
**Tags:** question, bug\
**Created:** [October 1, 2020, 10:10am UTC](https://discourse.julialang.org/t/unexpected-behaviour-of-include/47589 "2020-10-01T10:10:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhbdiehl](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jhbdiehl](https://discourse.julialang.org/u/jhbdiehl)\
**Post date:** [October 1, 2020, 10:10am UTC](https://discourse.julialang.org/t/unexpected-behaviour-of-include/47589/1 "2020-10-01T10:10:20Z")

</div>

`pwd()` and `include()` do not seem to agree on which working directory I am in.

Using Julia 1.5 on VS code. I have a directory structure resembling `./FolderA/FolderB` with my files being in FolderB.

`pwd()` in the Julia REPL in VSCode returns “/…/FolderA”, so to access other code files intuitively one needs to

```julia
include("./FolderB/[FILE]")

```

this however gives the usual

```julia
ERROR: LoadError: could not open file /.../FolderB/FolderB/[FILE]

```

indicating that include believes I am already in FolderB. This behaviour does not change when moving around with `cd()`.

Is this a bug, or is there some reason for this discrepancy? Also, when `using Distributed` this behaviour suddently changes and `pwd()` seems to accurately describe the working directory for different workers (i.e. ` @everywhere include("[FILE]")` throws an error while `@everywhere include("./FolderB/[FILE]")` works as expected.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [October 1, 2020, 10:29am UTC](https://discourse.julialang.org/t/unexpected-behaviour-of-include/47589/2 "2020-10-01T10:29:47Z")

</div>

Paths to `include` are always relative the calling file.

---

<div class="post-metadata">

**Author:** ![jhbdiehl](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jhbdiehl](https://discourse.julialang.org/u/jhbdiehl)\
**Post date:** [October 1, 2020, 11:39am UTC](https://discourse.julialang.org/t/unexpected-behaviour-of-include/47589/3 "2020-10-01T11:39:13Z")

</div>

Then why does the outcome change in an `@everywhere` frame? I think the **always** in your statement is not true…
