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

The document 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?

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

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

or

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

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

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

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

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

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?