This project helps you copy the entire contents of a folder on Google Drive to another folder on the same Google Drive or another Google Drive account.
Instructions for use
1. Requirements
2. PrepareGoogle Account.
Access to Google Drive API.
Google Colab (or IPython Notebook enabled environment).
To run the source code, follow these steps:
1: Install Libraries: No need to install additional libraries beyond what is available in Google Colab.
2: Enter input information:
Destination Drive (dest_text): Enter the link to the folder on Google Drive you want to copy to.
Source Drive (source_text): Enter the link to the Google Drive folder you want to copy from.
From page (from_page): First page number to start copying. Set to 0 if no paging.
To page (to_page): Last page number to stop copying. Set to 0 if no paging.
Maximum capacity (max_download_size_text): Maximum capacity (GB) allowed to copy. The program will stop if the total capacity exceeds this value.
Exclude (exclude_str_text): Strings to remove from file or directory names during copying. Multiple strings can be separated by commas.
3. Run Source Code
Code:
destDriveLink = dest_text.value
sourceDriveLink = source_text.value
fromPage = int(from_page_text.value)
toPage = int(to_page_text.value)
downloader = DownloadFromDrive()
downloader._limit_size = float(max_download_size_text.value)
downloader.excluded_strings = [ext.strip() for ext in exclude_str_text.value.split(",") if ext.strip()]
downloader.copy_drive_to_drive(destDriveLink, sourceDriveLink, fromPage, toPage)