# Include file

**URL:** <https://discourse.julialang.org/t/include-file/18189>\
**Category:** New to Julia\
**Created:** [November 30, 2018, 8:37pm UTC](https://discourse.julialang.org/t/include-file/18189 "2018-11-30T20:37:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/diger/32/36786_2.png) [@Diger](https://discourse.julialang.org/u/Diger)\
**Post date:** [November 30, 2018, 8:37pm UTC](https://discourse.julialang.org/t/include-file/18189/1 "2018-11-30T20:37:52Z")

</div>

Sorry for that stupid question, but I seem unable to get the include() to work called from the REPL. I just use inline:  
include(“C:\Users\Diger\Documents\Julia\test\_1.jl”)

and it is complaing about  
ERROR: could not open file C:\Users\Diger\Documents\Julia\test\_1.jl  
Stacktrace:  
[1] include at .\boot.jl:317 [inlined]  
[2] include\_relative(::Module, ::String) at .\loading.jl:1044  
[3] include(::Module, ::String) at .\sysimg.jl:29  
[4] include(::String) at .\client.jl:392  
[5] top-level scope at none:0

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [November 30, 2018, 8:47pm UTC](https://discourse.julialang.org/t/include-file/18189/2 "2018-11-30T20:47:47Z")

</div>

“\” is the escape character, so, e.g., “\U” means “escape-U”, and not “\U”. To get “\” in a string, you need to type “\\”. It is actually simpler to use the unix-syntax and use forward-slash instead – Julia correctly handles that even on Windows. Thus, type:

```nohighlight
include("c:/users/diger/documents/julia/test_1.jl")

```

---

<div class="post-metadata">

**Author:** ![Diger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/diger/32/36786_2.png) [@Diger](https://discourse.julialang.org/u/Diger)\
**Post date:** [November 30, 2018, 8:48pm UTC](https://discourse.julialang.org/t/include-file/18189/3 "2018-11-30T20:48:36Z")

</div>

I’m actually using double backslash and that always worked, now with 1.0.2 not anymore.

And with forward slash it still doesn’t work.

PS: Actually I managed. The problem apparently was that the file was recognized as a textfile by windows and somehow stayed that way (by symbol and so probably by recognition) even though I added the .jl ending. I created a new file and saved as .jl again and now the symbol changed and so it works. Dunno why this happens now. Never had this issue before.

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [December 1, 2018, 12:28am UTC](https://discourse.julialang.org/t/include-file/18189/4 "2018-12-01T00:28:15Z")

</div>

Perhaps the first file was actually `.jl.txt` but Windows was doing its silly “hide extensions for known file types” thing?
