from google.colab import drive
drive.mount('/content/drive')
%cd '/content/drive/MyDrive/<directory>'
Replace <directory>
with the path to the directory containing the folder you want to transfer.
!zip -r <foldername>.zip <foldername>
Replace <foldername>
with the name of the folder you want to transfer.
!cp <foldername>.zip '/content/drive/MyDrive/<destination>'
Replace <foldername>
with the name of the zip file you just created and <destination>
with the path to the directory in Google Drive where you want to save the zip file.
!unzip '/content/drive/MyDrive/<destination>/<foldername>.zip' -d '/content/drive/MyDrive/<destination>/<foldername>'
Replace <destination>
and <foldername>
with the appropriate names and paths. This will extract the contents of the <foldername>.zip
file into a new folder with the same name as the original folder.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-19 16:30:39 +0000
Seen: 10 times
Last updated: May 19 '23
What is the process for saving files onto a Kali Linux live USB?
Is there a way to transfer a video from Google Drive to a YouTube channel without using an API?
After restarting the session, my unzipped files are deleted by Google Colab.
How can I use Discord Webhook to be notified when there is an update in Google Drive?
What is the method for obtaining the complete directory path of a folder?
What is the process of creating a new project in Visual Studio Code in the year 2020?
The docker file is unable to detect the file located in the resource folder.