How to "save as" a notebook programmatically (from within the notebook), given a path string?

here is a path string (it specifies the new name and location of the new notebook)


I have tried many commands but none seem to work. I reckon it is something similar to this.

    FrontEndToken[FrontEnd`InputNotebook[], {path, "Notebook"}]

Unfortunately this similar question's solution doesn't work for me. (Maybe its because I'm using linux?)

  • 2
    $\begingroup$ Unless you just want to save the notebook to a different location, in which case NotebookSave is your function. $\endgroup$ – b3m2a1 Jul 16 '18 at 17:54

Expanding b3m2a1's comment...

path = "/home/conor/myNewNoteBook.nb";
NotebookSave[EvaluationNotebook[], path]

this can be made into a function, which can be auto loaded on start up, saving the user from having to use the mouse.

| improve this answer | |
  • 1
    $\begingroup$ If this is what you need I see no reason not to accept it so the question can be tagged as satisfactorily answered $\endgroup$ – b3m2a1 Jul 16 '18 at 18:17
  • $\begingroup$ Thanks, (it won't let me tag it for 2 days). I'll tag it in 2 days time. $\endgroup$ – Conor Cosnett Jul 16 '18 at 18:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.