cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!