# 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)

path="/home/conor/myNewNoteBook.nb"


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

FrontEndExecute[
FrontEndToken[FrontEndInputNotebook[], {path, "Notebook"}]
]


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

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

path = "/home/conor/myNewNoteBook.nb";
`