MichałK
MichałK

Reputation: 33

Datalab: moving notebook to other folder

I made a copy of a notebook in datalab. But instead of having the copy in the same folder - it was created at the root folder. That is probably a bug that needs to get fixed. In the mean time I tried to move the file to the right folder but the datalab UI doesn't seem to support that.

How do I move datalab notebook to the other folder?

Upvotes: 3

Views: 1802

Answers (3)

Jay
Jay

Reputation: 427

I would rather recommend that you connect to the DataLab instance via ssh and move the file.

default path: /mnt/disks/datalab-pd/content/datalab/

Upvotes: 3

Anthonios Partheniou
Anthonios Partheniou

Reputation: 1709

If you want to move a notebook into a folder that is not part of the official samples, then you may consider the following method:

Move notebooks using the rename function:
One method to move a notebook is to rename the notebook and include the relative path to the destination folder before the filename.

For example, assume that we have the following in the root folder

  • A notebook called Notebook2.ipynb
  • A folder called MyNotebooks


── MyNotebooks
│         └── Notebook1.ipynb

Notebook2.ipynb


To move Notebook2.ipynb into MyNotebooks, click on the notebook, then click rename, then rename the notebook as MyNotebooks/Notebook2.ipynb

Now you should see,

── MyNotebooks
│         └── Notebook1.ipynb
│         └── Notebook2.ipynb


Note: You will not be able to rename a notebook while there is an active session for the notebook. Make sure to stop the session first by clicking on Sessions, then clicking Shutdown on the specific notebook you want to move.

Upvotes: 4

Graham Wheeler
Graham Wheeler

Reputation: 2814

Notebooks created under the /datalab path are meant for official samples, tutorials, etc. While you could create new notebooks there, making a copy of a notebook will instead create it in the root. If you are experiencing this elsewhere though that sounds like a bug.

There is no direct facility for moving notebooks; however you can download a notebook as a .ipynb file and then from the main tree view you can navigate to the directory you want it to go in and click on 'Upload' to upload it.

Upvotes: 1

Related Questions