Navigate from home directory fo file directory automaticly

Following the opening document of jupyterlab app on desktop: add launch documentation · jupyterlab/jupyterlab-desktop@71be7c6 · GitHub , I create a batch file that allows me to open a .ipynb file directly with the app on double click and to set the home folder to my desire one:

set JLABPATH=C:\JupyterLab
set HOMEDIR=C:\Users\Username\
start "" %JLABPATH%\JupyterLab.exe %HOMEDIR% %1

However, the directory stays in the Home and does’nt change when I open the file, contrary on web browser if I set the
jupyter_server_config.py
with
c.ServerApp.root_dir = "C:/Users/Username/Desktop/"
type or paste code here

Let’s say I want to open a file on …/Desktop/dir1/dir2/test.ipynb, with browser (page on the top of the image):

Whereas on app I just got the page on the bottom with written dir1/dir2/test on the top of the app.

Did someone know how I can change that?

Thanks a lot

to open with we browser by double clicking my batch file was

set ANACONDAPATH=C:\Users\Thomas\anaconda3
start "" %ANACONDAPATH%\pythonw.exe %ANACONDAPATH%\cwp.py %ANACONDAPATH%^ %ANACONDAPATH%\pythonw.exe %ANACONDAPATH%\Scripts\jupyter-lab-script.py %1

If that could help someone, I’m still searching how I can change that.

1 Like