How to Open Jupyter Notebook from a Specific Directory and How to Enable Folder Navigation in Jupyter Notebook

BaskarBaskar
2 min read

In this article, let me show you how you can open a Jupyter Notebook from a Specific Directory and also how to enable folder navigation in the Jupyter Notebook so that you can open .pynb file from any directory.

Say, for example, I want to open the Jupyter notebook from a specific folder path called “E:\bbabu\my_jupyter_projects\projects2”. So, to do this, follow the below steps.

Opening Jupyter Notebook from Specific Directory:

  1. Open "Anaconda Command Prompt"

  2. Change to the required Drive
    (base) C:\Users\BASBABU>e:

  3. Change to the required directory by simply typing the full folder path:
    (base) E:>cd "E:\bbabu\my_jupyter_projects\projects2"

Enabling Folder Navigation in Jupyter Notebook:

Suppose, you have three projects folder say “projects1”, “projects2” and “projects3” under the main parent folder called “my_jupyter_projects”. By default, if you open the Jupyter Notebook, you can’t traverse between the directories. So, if you want to open a jupyter notebook from a different directory, you have to follow the same steps as described in above section. But, if you enable folder navigation, then you can simply traverse between the directories and open your jupyter notebook .pynb program files from any of your sub-directories. To do this, follow the below steps.

  1. While opening the jupyter notebook from the Anaconda Command Prompt, just include the parameter such as "--notebook-dir" as like below:
    (base) C:\Users\BASBABU>e:

    (base) E:>jupyter notebook --notebook-dir "E:\bbabu\my_jupyter_projects"

  2. Now, you can see the navigation in your Jupyter Notebook. I have provided the screenshots for your reference.

As you see in the above screenshot, You can traverse between any of these directories and open your .pynb files.


Thanks for reading this article.

0
Subscribe to my newsletter

Read articles from Baskar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Baskar
Baskar