%run is not working

Databricks3
Contributor

I have created two notebooks in my workspace one(A) is having function and other one(B) is having the main code.

I am trying to use the %run magic function to use the functions available in notebook A from notebook B. Both notebooks are on the same path.

/User/Myuser/NotebookA

/User/Myuser/NotebookB

I am using below command in Notebook A

%run ./NotebookB

I am getting the below error

UsageError: Line magic function `%` not found.

Anyone could help me here.

Thanks in Advance.