# IOerror: no such file or directory (ENOENT)

**URL:** https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544
**Category:** Juno
**Created:** [January 11, 2019, 10:15pm UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544 "2019-01-11T22:15:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![svpillai](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@svpillai](https://discourse.julialang.org/u/svpillai)
#### Post date: [January 11, 2019, 10:15pm UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544/1 "2019-01-11T22:15:22Z")

</div>

I’m trying to load a .jld2 file with the JLD2 package using @load “filename.jld2” command and it had previously worked, however now I’m getting error message: ERROR: IOError: chdir filename: no such file or directory (ENOENT). This same error message pops up when I try to set working directory with cd(“file”). I’m using Julia v1.0.2 Juno/Atom.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 12, 2019, 9:45am UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544/2 "2019-01-12T09:45:07Z")

</div>

It is most likely that the file is not found. Try eg

```julia
filesize("/full/path/to/file")

```

---

<div class="post-metadata">

### Author: ![svpillai](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@svpillai](https://discourse.julialang.org/u/svpillai)
#### Post date: [January 12, 2019, 9:53am UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544/3 "2019-01-12T09:53:27Z")

</div>

I just did- it says 0. I’m not sure why though? The .jld2 file and the main folder to which it belongs certainly exist and have been used for other analyses.

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 12, 2019, 9:56am UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544/4 "2019-01-12T09:56:33Z")

</div>

You can also try `isfile`, but `filesize` gives `0` for non-existent paths.

```julia
julia> filesize("/non/existent")
0

```

---

<div class="post-metadata">

### Author: ![svpillai](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@svpillai](https://discourse.julialang.org/u/svpillai)
#### Post date: [January 12, 2019, 10:02am UTC](https://discourse.julialang.org/t/ioerror-no-such-file-or-directory-enoent/19544/5 "2019-01-12T10:02:38Z")

</div>

hm, the isfile command returns False…
