# Include("//111.1.1.1/drive\\$/.../test.jl") from network disc on Windows

**URL:** <https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [July 29, 2020, 8:34am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858 "2020-07-29T08:34:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 29, 2020, 8:34am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/1 "2020-07-29T08:34:35Z")

</div>

Hey guys,

happy julia con 🙂

How would I `include()` from a network disc like:

```julia
include("C:.../file.jl")
Core.include(Main, "//111.1.1.1/drive\$/.../test.jl")

```

The second one doesn’t work for me. Any ideas?

Cheers!

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 29, 2020, 9:46am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/2 "2020-07-29T09:46:02Z")

</div>

This kinda works, but I’m not sure if it’s save to use…

```julia
Core.include(Main, "//111.1.1.1/drive\$/.../test.jl")

```

But not in all cases.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [July 29, 2020, 11:07am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/3 "2020-07-29T11:07:13Z")

</div>

The documented function is [`Base.include`](https://docs.julialang.org/en/v1/base/base/#Base.include), rather than `Core.include`, so it’s better to use that one.

That being said, I don’t understand why the module chosen for including the code of a file is something that should have something to do with `readdir` from a network disc…

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 29, 2020, 11:20am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/4 "2020-07-29T11:20:26Z")

</div>

Sorry my bad. I have change the post. I need the `include`. `readdir` was just a test and it worked.

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 29, 2020, 11:23am UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/5 "2020-07-29T11:23:21Z")

</div>

`Base.include` does not work with that file path. So I debugged it and `Core.include` did but not inside other modules.

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [July 29, 2020, 2:36pm UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/6 "2020-07-29T14:36:42Z")

</div>

Could you map the network drive in explorer (`net use y:\ \\111.1.1.1\drive`).  
Maybe that would help?

Actually the code you have does not work for me anyway.  
Is there an Base.include function that takes a module as argument?

```julia
julia> include(Main,"c:\\temp\\test.jl")
ERROR: MethodError: no method matching include(::Module, ::String)
You may have intended to import Base.include
Stacktrace:
 [1] top-level scope at REPL[2]:1

```

---

<div class="post-metadata">

**Author:** ![Impressium](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/impressium/32/19575_2.png) [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Post date:** [July 29, 2020, 2:52pm UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/7 "2020-07-29T14:52:44Z")

</div>

Thanks for your response 👍  
Too many edits^^ It should be:

```julia
Core.include(Main, "//111.1.1.1/drive\$/.../test.jl")

```

With that I’m able to load it sometimes.

---

<div class="post-metadata">

**Author:** ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)\
**Post date:** [July 29, 2020, 4:59pm UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/8 "2020-07-29T16:59:23Z")

</div>

ok.  
The following works flawlessly for me.

```julia
include(raw"\\13.14.15.10\famkoenig\temp\test.jl") 

```

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [July 29, 2020, 6:05pm UTC](https://discourse.julialang.org/t/include-111-1-1-1-drive-test-jl-from-network-disc-on-windows/43858/9 "2020-07-29T18:05:53Z")

</div>

> [@bernhard](#):
>
> Actually the code you have does not work for me anyway.  
> Is there an Base.include function that takes a module as argument?

Yes, but that method is not exported, so you have to call it as `Base.include`.
