Access the parent folder with JupyterLab

When I open a ipynb file using Jupyterlab, is there a way to then have access to the parents folders of the file?

In fact I can see the full path when I click on the grey folder juste under the search file bar, but I can’t access the parents folder.

Is there a way to change that?

1 Like

The short answer is you can set JupyterLab to start out in what you consider the ‘parent’ directory in your system’s file tree structure if you indeed need to access that directory in the file browser panel / file navigation panel.

The basis for this is covered in several posts on this Forum, JupyterLab issues, and StackOvefflow. See:

Jason Grout’s answer there and Michał Krassowski’s answer here and here covers how you could start JupyterLab where you want in your file system hierarchy. Michał Krassowski has a nice related 2021 summary here, too.


The inability to navigate to parent directories above the entrypoint directory navigation is an issue that keeps coming up with new users. could it become a setting that is off by default?

I sometimes launch too low and then I have to lose all my in memory variables when relaunching higher


That shouldn’t be the case. The file browser panel is only a convenience if you are using it on your own local machine. There’s no need to relaunch once you have an established session because you can use %cd, pwd, and ls to do almost everything you could do with file browser directly in the running .ipynb file by changing the working directory. If you make something useful via Jupyter, you can use your system’s graphical user interface to move or copy it to a different place on your system.

I disagree. What if you want to open a notebook in a parent/sibling directory? You either launch a 2nd service or relaunch the existing service.


Then the current session variables wouldn’t matter if it is a separate notebook unless you are using import and that would be rare for novices.

The places I reference in my post above have the places where the basis for this is spelled and that would be the place to take up such further discussion.

I disagree because scientific computing is a bit more ad hoc than that. I often have a big table of intermediate results loaded in notebook A and then want to launch notebook to manually inspect an entry from that table in notebook B.

So I’ve gotten in the habit of launching jupyterlab at file system root and drilling into relevant folders, which is also annoying

Imagine yourself as a new user that has just installed jupyterlab. you fire it up to try it out and fairly immediately hit the folder navigation problem - lame

Understood; however, I’m still think the references I supplied include more appropriate for making the case to those can manifest changes if warranted. This original post was just about how given the current situation and I think that has been addressed.

Hello, thanks for all the usefull answers and references but it looks like I don’t really find what I’m searching.

I know that I can navigate through directory in jupyterlab but what I would really want is a sort of bash script or changes in parameters that would allow me, when I click on my .ipynb files, to open the file and automaticaly give the access to the parent directory if there is one or maybe the n-2 directory if there is one.

Is there a way to do this?


Is there a way to do something like this?