# Appending to a JLD

**URL:** <https://discourse.julialang.org/t/appending-to-a-jld/4417>\
**Category:** General Usage\
**Created:** [June 22, 2017, 6:56pm UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417 "2017-06-22T18:56:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcnlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rcnlee/32/4107_2.png) [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Post date:** [June 22, 2017, 6:56pm UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417/1 "2017-06-22T18:56:12Z")

</div>

Is there a good way to append variables to a JLD file?  
The readme talks about `save()` but that seems to only save a number of variables at once, not incrementally.

Thanks!

---

<div class="post-metadata">

**Author:** ![rcnlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rcnlee/32/4107_2.png) [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Post date:** [June 22, 2017, 6:59pm UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417/2 "2017-06-22T18:59:23Z")

</div>

Sorry, nevermind. I think the jldopen syntax should work.

---

<div class="post-metadata">

**Author:** ![rcnlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rcnlee/32/4107_2.png) [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Post date:** [June 22, 2017, 7:34pm UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417/3 "2017-06-22T19:34:57Z")

</div>

Actually, the append mode “a” seems to be commented out. Is it implemented?

---

<div class="post-metadata">

**Author:** ![slowbrain](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slowbrain/32/2224_2.png) [@slowbrain](https://discourse.julialang.org/u/slowbrain)\
**Post date:** [June 22, 2017, 10:28pm UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417/4 "2017-06-22T22:28:06Z")

</div>

you are on it, to add any extra “variables” to already existing JLD file do following

```julia
f = jldopen(filename, "r+")
write(f, "new_variable", new_variable)
close(f)

```

---

<div class="post-metadata">

**Author:** ![rcnlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rcnlee/32/4107_2.png) [@rcnlee](https://discourse.julialang.org/u/rcnlee)\
**Post date:** [June 23, 2017, 4:42am UTC](https://discourse.julialang.org/t/appending-to-a-jld/4417/5 "2017-06-23T04:42:35Z")

</div>

Thank you so much!
