How to get the full path to the current notebook
This article explains how to get full path to the current notebook.
Scala
To get the full path in a Scala cell, run the following command in a cell:
%scala
dbutils.notebook.getContext.notebookPath
Python
To get the full path using Python, you have to get the path and save it into a widget in a Scala cell and read it in a Python cell.
Save the value into a widget from Scala cell.
%scala dbutils.widgets.text("notebook", dbutils.notebook.getContext().notebookPath.get)
Access the widget value from Python cell.
%python dbutils.widgets.get("notebook")