# addpath("C:\\Users\\")

**URL:** <https://discourse.julialang.org/t/addpath-c-users/22519>\
**Category:** New to Julia\
**Tags:** package\
**Created:** [March 29, 2019, 9:59pm UTC](https://discourse.julialang.org/t/addpath-c-users/22519 "2019-03-29T21:59:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [March 29, 2019, 10:40pm UTC](https://discourse.julialang.org/t/addpath-c-users/22519/4 "2019-03-29T22:40:58Z")

</div>

You can define a function that does that and then call it. Note, there’s no need to `cd` into a directory to read it’s contents:

```julia
function include_all_files(dir::String)
    files = filter!(x -> isfile(x) && endswith(x, ".jl"), readdir(dir)
    foreach(include, files)
end

```

Why do you want to include all the files in a directory in the first place?

---

_[View the full topic](https://discourse.julialang.org/t/addpath-c-users/22519)._
