Table of Contents
Going around the forums about Google Drive, Hieu has many people who want to transfer ownership of Google Drive folder and subfolders in bulk but have no solution or have to use a third party and pay a fee. With experience researching Google Drive API and being the author of simple-drive (A Google Drive library on Python), Hieu will guide you on all the ways to transfer ownership of Google Drive effectively and for free.
Notes before implementation
Ownership of Google Drive can only be transferred to members of the same organization (domain) .
Let Hieu give you an example to make it easier to understand. Files or folders of an account belonging to @gmail.com (a normal account) can only be transferred to another account also belonging to @gmail.com. Similarly, files and folders of an account belonging to @lucidgen.com (a Google Workspace account) can only be transferred to another account belonging to @lucidgen.com.
Difference between a Google Workspace account and a regular Gmail account in transferring ownership of Google Drive:
Characteristic | Google Workspace | Gmail |
---|---|---|
Scope of Implementation | Các tài khoản cùng Google Workspace. | Các tài khoản Gmail bình thường. |
Effective date | Đổi chủ sở hữu ngay lập tức. | Chỉ gửi lời mời làm chủ sở hữu, tài khoản nhận thư mời phải xác nhận đồng ý. |
Cancel action | Không thể. | Có thể hủy trước khi tài khoản nhận thư mời chưa đồng ý. |
Transfer ownership of a Google Drive folder
Step 1: Select a folder and edit the recipient’s permissions from Editor to Transfer ownership.
Changing ownership of a folder only affects that folder, not the files inside the folder. Don’t worry, Lucid Gen’s tool will help you.
Step 2: Send an invitation to transfer ownership of Google Drive folder. Click the Send Invitation button.
Step 3: The new owner will need to accept the invitation if the account is not Google Workspace. Click the Accept button to become the owner of the file.
Workspace accounts transfer ownership immediately without the recipient’s consent.
If you want to cancel the invitation to transfer ownership of Google Drive, change the permission from Editor (Pending owner) to Cancel ownership transfer. Only Gmail accounts can cancel an invitation to transfer ownership of Google Drive before the recipient agrees.
Transfer ownership of all files
This method allows you to transfer permissions to all files on Google Drive at once. The downside of this method is that it still does not transfer permissions to files located inside the folders you have selected.
Step 1: Select all files and share them to transfer ownership of all files.
Step 2: The new owner must accept the invitation if the account is a regular Gmail. Click the Respond button to reply.
Select all files, click the share button, and click the Accept ownership button to accept or decline the invitation.
To withdraw ownership transfer of all files on Google Drive, select all files, click the share button, and edit permissions from Editor (Pending owner) to Cancel ownership transfer.
Transfer ownership of Google Drive in bulk using a tool
Lucid Gen’s Transfer Ownership Tool can help you transfer ownership of Google Drive in a powerful and completely free way. Here’s what it can help you do:
- Export the list of files in the account to an Excel file.
- Transfer ownership of Google Drive folder including all files and subfolders:
- All files and folders of the account.
- All files and folders are inside a specific directory.
- All files and folders are by an ID list.
- Configure from an Excel file with ID and email columns.
- Withdraw invitation to transfer ownership of Google Drive (Gmail):
- All files and folders of the account.
- All files and folders are inside a specific directory.
- All files and folders are by an ID list.
- Accept or decline the invitation to transfer ownership of Google Drive (Gmail).
- All files and folders in Shared With Me.
- All files and folders are inside a specific directory.
- All files and folders are by an ID list.
However, to use this tool you need to have a file client_secret.json
that has been properly configured according to how to create a Client Secret in Google Cloud.
Remember to add the emails you want to use with the tool to Test Users.
Log in
Step 1: Open the tool and start logging in. Enter to select the client_secret.json
file, and continue Enter to automatically open your browser.
Step 2: Select the account you added to the Test Users of the project in this client_secret.json
file.
Step 3: Confirm to continue logging in. Click the Continue button.
Keep clicking Continue until you are successfully logged in.
Transfer ownership of Google Drive in bulk
After successfully logging in, you will see the menu. To use any feature, just enter the number of that feature.
For example, if you want to transfer ownership of Google Drive for a folder including its files and folders, you should do the following:
- Choose an action: 2.
- Select a method to transfer ownership: 2.
- Please provide the recipient email: Email of the recipient of ownership on Drive.
- Please provide the folder_id: ID of the folder to transfer ownership of Google Drive.
Cancel transfer ownership of Google Drive in bulk
For example, if you want to revoke the Google Drive ownership transfer invitation for a folder that includes its files and folders, you should do the following:
- Choose an action: 3.
- Select a method to cancel ownership transfer: 2.
- Please provide the folder_id: ID of the folder to cancel the transfer ownership of Google Drive.
Accept pending owner in bulk
For example, if you want to accept the pending owner of a directory including its files and directories, you should do the following:
- Select an action: 4.
- Would you like to Accept or Decline: 1.
- Select a method to accept pending owner: 2.
- Please provide the folder_id: ID of the folder to accept the pending owner.
To sign in to a different account, you can use the Switch accounts action or close and reopen the Transfer Ownership Tool.
transfer ownership of Google Drive in Python
If you are a Python user, check out how to use Google Drive API in Python with Simple-Drive. Here is a sample code to transfer ownership, cancel ownership, and accept pending ownership.
from simple_drive import Auth, Drive, SearchTerms, Roles
# Authorize
auth = Auth.local_web_server(client_secrets_file='client_secrets.json')
drive = Drive(auth, verbose=True)
# Get files and sub-folders in a folder
email = 'current_owner@gmail.com'
folder_id = 'YourFolderID'
files = drive.Files.list(SearchTerms.owner_email(value=email),
SearchTerms.folder_id(folder_id),
SearchTerms.trashed_equal(False),
deep_folder=True)
# Transfer ownership
recipient_email = 'new_owner@gmail.com'
for file in files:
drive.Permissions.transfer_ownership(file_id=file['id'], email=recipient_email)
# Cancel ownership transfer
for file in files:
drive.Permissions.update(file_id=file['id'], email=recipient_email, role=Roles.EDITOR)
# Accept pending owner (Remember login to the recipient account first)
for file in files:
drive.Permissions.pending_owner(file_id=file['id'], accept=True)
Conclusion
Initially, Hieu only intended to write a tutorial on transferring ownership of Google Drive in Python. But thinking back, Hieu realized that many people who are not familiar with coding cannot use the API, so he created the Transfer Ownership Tool. We hope that in the future, Google Drive will have the feature of transferring all files and subfolders inside a selected folder. If you find this tool useful, please share the article or donate to me.