Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
smpa01
Super User
Super User

Progrmatically get NB path/directory

Is it possible to retrieve progrmatically the current path/directory of the notebook; the following does not return the desired

 

notebookutils.notebook.get('NB1')

 

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @smpa01,

In fact, this code is used to get the detail information of notebook instead of path/directory.

{'id': 'xxxxxxx',
 'type': 'Notebook',
 'displayName': 'notebook name',
 'description': 'New notebook',
 'workspaceId': 'xxxxxxxx',
 'properties': {}}

You can extract the 'id' and 'workspace id' properties to concatenate the relative path: groups/{workspace id}/synapsenotebooks/{noteboke id}.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @smpa01,

In fact, this code is used to get the detail information of notebook instead of path/directory.

{'id': 'xxxxxxx',
 'type': 'Notebook',
 'displayName': 'notebook name',
 'description': 'New notebook',
 'workspaceId': 'xxxxxxxx',
 'properties': {}}

You can extract the 'id' and 'workspace id' properties to concatenate the relative path: groups/{workspace id}/synapsenotebooks/{noteboke id}.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.