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?


1 Answer 1


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

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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