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

60 Days of Data Days! Live and on-demand sessions, challenges, study groups and more! And it's all FREE!. Join now. Learn more

Reply
smpa01
Community Champion
Community Champion

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: Live Sound
• Beautiful News: Women in Parliament, Energy Mix, Shrinking Armies
• Visual Capitalist: Working Hrs
• Others: Easing Graph, Animated Calendar
MayViz Submissions
• Week 1: View
• Week 2: View
• Week 3: View
• Week 4: View
========================
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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.