# Julia Source Code Directory

**URL:** <https://discourse.julialang.org/t/julia-source-code-directory/64904>\
**Category:** New to Julia\
**Created:** [July 19, 2021, 4:45am UTC](https://discourse.julialang.org/t/julia-source-code-directory/64904 "2021-07-19T04:45:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Nelson\_Chow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nelson_chow/32/27288_2.png) [@Nelson\_Chow](https://discourse.julialang.org/u/Nelson_Chow)\
**Post date:** [July 19, 2021, 5:32am UTC](https://discourse.julialang.org/t/julia-source-code-directory/64904/5 "2021-07-19T05:32:53Z")

</div>

Thanks Team,

Looking at another thread,

> [@The macrocall @\_\_FILE\_\_ does not return the directory of the file, but rather the REPL output number](https://discourse.julialang.org/t/the-macrocall-file-does-not-return-the-directory-of-the-file-but-rather-the-repl-output-number/55585):
>
> I have been using to following to change my working directory to the location of my .jl scripts in Atom as follows without problems: cd(dirname(@\_\_FILE\_\_)) When I run a script with this in vs code, I get an error and it doesn’t change my working directory: julia\> cd(dirname(@\_\_FILE\_\_)) ERROR: IOError: chdir : invalid argument (EINVAL) Stacktrace: [1] uv\_error at .\libuv.jl:97 [inlined] [2] cd(::String) at .\file.jl:84 [3] top-level scope at REPL[2]:1 The reason that is I think is because …

using ctrl-enter will yield what i get, and using alt-enter is a better way to execute code, and get what i actually want.

Cheers,  
take care  
Nelson

---

_[View the full topic](https://discourse.julialang.org/t/julia-source-code-directory/64904)._
