# \[export\] The correct command syntax for exporting note as jex format?

**URL:** <https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870>\
**Category:** Support\
**Created:** [15 October 2018 07:08 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870 "2018-10-15T07:08:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![photonxp](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/photonxp/32/350_2.png) [@photonxp](https://discourse.joplinapp.org/u/photonxp)\
**Post date:** [15 October 2018 07:08 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/1 "2018-10-15T07:08:05Z")

</div>

The [document](https://joplin.cozic.net/terminal/) said:

> export \<path\>  
> ...  
> --format Destination format: jex (Joplin Export File), raw  
> (Joplin Export Directory), md (Markdown)  
> --note Exports only the given note.  
> --notebook Exports only the given notebook.

So i tried:

> ~/.joplin-bin/bin/joplin-terminal export ./exported\_dir --note x-ray-pulsar-space-navigation..2018-01-12T21.31.54 --format jex

Then got the error:  
**Path is a directory** : ./exported\_dir

Joplin works fine if I change the format from jex to md.

Does that mean I shouldn't export the note to a directory with the jex format? Or is something else wrong?

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [15 October 2018 07:25 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/2 "2018-10-15T07:25:45Z")

</div>

you want to export a file so provide a complet path to this one

```auto
joplin --profile ~/.config/joplin-desktop/ export ~/Downloads/code_projet.jex "Codes Projet" --format jex

```

or

```auto
joplin --profile ~/.config/joplin-desktop/ export ~/Downloads/code_projet.jex --note "Codes Projet" --format jex
ls ~/Downloads
code_projet.jex

```

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [16 October 2018 23:43 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/3 "2018-10-16T23:43:53Z")

</div>

Hmm, I don’t understand. What happens if there are 2 notes with the same name? Somehow this makes no sense.

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [17 October 2018 05:15 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/4 "2018-10-17T05:15:44Z")

</div>

Don't know 🙂  
It should be better to use the note id

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [17 October 2018 17:53 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/5 "2018-10-17T17:53:48Z")

</div>

Does this mean you can use the id or not? Or are you saying it should be supported in the future?

---

<div class="post-metadata">

**Author:** ![foxmask](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@foxmask](https://discourse.joplinapp.org/u/foxmask)\
**Post date:** [17 October 2018 20:16 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/6 "2018-10-17T20:16:39Z")

</div>

you can use id for sure, and I think it’s the best way to avoid this kind of behavior.

---

<div class="post-metadata">

**Author:** ![photonxp](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/photonxp/32/350_2.png) [@photonxp](https://discourse.joplinapp.org/u/photonxp)\
**Post date:** [18 October 2018 04:23 UTC](https://discourse.joplinapp.org/t/export-the-correct-command-syntax-for-exporting-note-as-jex-format/870/7 "2018-10-18T04:23:31Z")

</div>

or perhaps “id with partial note name”?

Besides, what will happen if a user exports a bunch of files? So to enter the file names one by one?
