## `NOTEBOOKFILE, NOTEBOOKPATH` -- Notebook file name and path

#### Introduction

The environment variables `NOTEBOOKFILE` and `NOTEBOOKPATH` store the absolute file name and the directory name, respectively, of the current Notebook in MuPAD Pro for Windows as a string.

#### Call(s)

`NOTEBOOKFILE`
`NOTEBOOKPATH`

#### Related Functions

`LIBPATH`, `READPATH`, `TESTPATH`, `UNIX`, `WRITEPATH`

#### Details

- The environment variable `NOTEBOOKFILE` stores the name of the current Notebook that is connected to the MuPAD kernel.

- The environment variable `NOTEBOOKPATH` stores the name of the directory where the current Notebook is located.

- These variables are useful, for example, when reading files that are located relative to the Notebook.

  Both variables only have a value if the Notebook has a name, which is generally the case when an existing Notebook has been opened or a new Notebook has been saved.

- The name given by `NOTEBOOKFILE` is an absolute file name.

- Both variables are read-only and are write-protected. One cannot assign a new value to `NOTEBOOKFILE` in order to change the name of the Notebook.

- `NOTEBOOKFILE` and `NOTEBOOKPATH` are only defined in MuPAD Pro for Windows. On other platforms, the two variables are just normal identifiers.

#### Example 1

In MuPAD Pro for Windows, one may supply start-up commands for a Notebook, which are executed when the Notebook is connected to a kernel. (See the menu File/Properties in the on-line help.)

In the start-up commands one may use `NOTEBOOKPATH` to read a source file ```my_init.mu`'' which is stored in the directory of the Notebook:

    >> fread(NOTEBOOKPATH."my_init.mu")

#### Changes

- `NOTEBOOKFILE` and `NOTEBOOKPATH` are new environment variables.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000