Subfolder 'gdrive' from the folder 'content' is not being recognized. This image is the screenshot of the error
Asked
Active
Viewed 623 times
0
-
use: `/content/gdrive` – Inder Mar 10 '19 at 12:56
-
thank you , but the actual code that was executed in spyder worked without the forward slash. its confusing – M JAYANTH VARMA Mar 10 '19 at 13:02
-
its the difference in paths, content isn't a directory in path, you can use `ls` for dirs that you can access without /, for example we access `/home/` or `/bin/` etc – Inder Mar 10 '19 at 13:05
-
/ was necessary everywhere its just that the backend takes care of it, say you are in a directory `/home/my_Dir/` which has the file `text.txt` , if you are executing somehting in `my_Dir` you can ask for the name `text.txt` directly. but if you are in the `/home/` you will need to specify `my_Dir/text.txt`. because that is the position or path of the file. – Inder Mar 10 '19 at 14:27
-
there are different partitions most of the space is available under /home/ but if you mount an external drive it has a location starting from `/content/` (in this particular case) – Inder Mar 10 '19 at 14:29
2 Answers
0
you need to use the id of the google drive folder. google drive folder are accessible by their ids not names.
here is how you find the id of the folder link

mayank Chandel
- 58
- 1
0
You need a leading /
in your path. For example, run:
from google.colab import drive
drive.mount('/content/gdrive')
%cd /content/gdrive

Bob Smith
- 36,107
- 11
- 98
- 91