0
$\begingroup$

I have processed some png images on Colab and saved them in the Colab Directory. Now I want to save these images from Colab to Google Drive. How can I do this?

$\endgroup$

1 Answer 1

3
$\begingroup$

Just mount your drive into Colab and create the checkpoint in the mount point location. Let me try to explain this with an example:

  1. Mount the drive as follows:
from google.colab import drive
drive.mount('/content/gdrive')

This will mount your drive and your google drive files should be all under /content/gdrive/My Drive/ location

  1. Now use your location as you would use any other location in bash or create the check-point directory as follows: You can use the ! to run bash commands in notebooks as follows:
!cp -r <PATH_TO_PNG_FOLDER> /content/gdrive/My Drive/
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.