cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to go up two folders using relative path in %run?

cmilligan
Contributor II

I'm wanting to store a notebook with functions two folders up from the current notebook. I know that I can start the path with ../ to go up one folder but when I've tried .../ it won't go up two folders. Is there a way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions

UmaMahesh1
Honored Contributor III

Hi @Coleman Milligan​ 

Please try ../../notebook

If you need to go more levels you need to add ../

It is standard dox notations.

Basically

./notebook - same directory relative path

../notebook - one directory above your current directory

../../notebook - 2 directories above your current directory

../../../notebook - 3 directories up and so on......

Hope this helps

Cheers...

View solution in original post

2 REPLIES 2

UmaMahesh1
Honored Contributor III

Hi @Coleman Milligan​ 

Please try ../../notebook

If you need to go more levels you need to add ../

It is standard dox notations.

Basically

./notebook - same directory relative path

../notebook - one directory above your current directory

../../notebook - 2 directories above your current directory

../../../notebook - 3 directories up and so on......

Hope this helps

Cheers...

VaibB
Contributor

In order to access a notebook in the current folder use ../notebook_2

to go 2 folders up and access (say notebook "secret") use ../../secret

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.