Google Drive file move

This is a memorandum when you move Google Drive data from your @gmail account to your @ G-Suite account.

You can move between the same domains ([email protected][email protected]) at once by using the sharing function [1], but between different domains ([email protected][email protected]) There are no tools or services to move to) in bulk. (As of June 2020)

important point ・ This time, I had to move while keeping the data link of @ gmail.com. -You need to change the owner of the file (If you use the sharing function or download it, the link will be broken.)


Method

  1. Utilize Google Sync and DriveFileStreem
  2. Coding in Python

1. Utilize Google Sync and DriveFileStreem

https://www.google.com/intl/ja_ALL/drive/download/ Download and install the official app at. You can set it in order. Source: Google Sync and Destination: DriveFileStreem is displayed in the Explorer navigation window. First, move the folder / file you want to move from the Google sync folder once locally. Move the locally moved folders / files to DriveFileStreem.

You can only move files from Google Sync to DriveFileStreem, but you can move folders by sandwiching the local.

2. Coding in Python

This also uses Google Sync and DriveFileStreem.


import shutil
FROM='G:/My drive/Target folder'
TO='G:/Shared drive/For home/Target folder'
new_path = shutil.move(FROM, TO)

You can run it once and leave it alone, but it will take longer than method 1. An error may occur, so please do so at your own risk.


If you have any other suggestions or suggestions, please feel free to contact us. I wrote it in scribble, so I will fix it to an easy-to-understand article.

reference [1] https://codeaid.jp/blog/gdrive-move/

Recommended Posts

Google Drive file move
Upload JPG file using Google Drive API in Python
Google Drive API Set File Permission (Set permissions on Google Drive files)
Make a copy of a Google Drive file from Python
ls -R on Google Drive
Mount google drive with google-drive-ocamlfuse
Access Google Drive with Python
Google Drive Api Tips (Python)
Python: Extract file information from shared drive with Google Drive API
Download Google Drive files in Python
How to search Google Drive with Google Colaboratory
Upload images to Google Drive with Python