0

I have a folder with many folders inside - what will be the best way to upload it to google colab? I tried to follow this link: How to upload folders to Google Colab? But it didn't find my folder:

!unzip -uq "/content/drive/My Drive/Data/Output/" -d "/content/drive/My Drive/Data/Output/"

And get the error:

unzip:  cannot find or open /content/drive/Data/Output/, /content/drive/Data/Output/.zip or /content/drive/Data/Output/.ZIP.

Data is a folder in the drive (in the main dir. It has a folder named 'output' that has 20 folders: 001, 002 , ... 020). I want to upload all the output dir.

Cranjis
  • 1,590
  • 8
  • 31
  • 64
  • The accepted answer in the linked question you should be the recommended way. Did it find other folders or files in your drive? If it didn't, you probably have a problem mounting it. Is it a shared folder? I believe Google Colab only mounts folders that are on your drive. If it is a shared folder, you can add it to your drive to see it. – Hernán Alarcón Aug 20 '20 at 17:25
  • @HernánAlarcón It is my drive - Please see the edit – Cranjis Aug 20 '20 at 18:01

1 Answers1

0

If those files are already on your google drive the easiest way is to mount your google drive in colab.

It can be done without code using the UI in colab notebook. Connect to an instance, open the window in the top left corner and find the mount google drive button.

The mounted drive should be located in /content/drive/

Grinjero
  • 436
  • 2
  • 7