Pages

Monday, March 13, 2017

How to Copy Folders in Google Drive

Wouldn’t it be nice if there were an xcopy (Windows) or rsync (Mac, Unix) like command for Google Drive that would recursively copy everything inside a folder, easily It should not only copy all the files and subdirectories but also retain the directory tree structure and maintain the shared file permissions.
Well, we are not sure if Google will ever provide an option to duplicate folders in Google Drive but there’s an open source web app by Eric YD that does exactly what you are looking for. Here’s how to get started:
  • Go to labnol.org/xcopy and click the Authorize button.
  • Allow the app to access your Google Drive files. The app would perform the copy operation directly inside your Google account without involving a third-party server.
  • Once authorized, select the source folder using the Google File picker and specify the destination folder name.
  • Click the Copy Folder button to begin the cloning process.
That’s it. The script will run in the background and copy files, one-by-one, into the target folder.  It will log everything in a Google Spreadsheet so you know what’s happening behind the scene.
While optional, the app can also retain permissions and in the case the copied files will be editable/viewable by the same people as the original files. The copying process would however take longer if you choose to copy the sharing permissions.

Copy Folders to another Google Drive Account

Say you have a folder in one Google account (A) that you would like to copy to another Google account (B). While the app doesn’t support copying across accounts, there’s a simple workaround:
  1. Use labnol.org/xcopy to copy the folder in its original account (A).
  2. Log into account B, create a blank folder and share it with account A.
  3. Log into account A and move the copied folder into the shared folder.
  4. Go back to account B and remove the sharing permissions for the folder.
The Alternative – If you are not comfortable giving access to your Google Drive to another app, you can manually copy folders using the Google Drive desktop client for Windows and Mac. Go to Windows Explorer (or Finder), select the source folder and press Ctrl+C followed by Ctrl+V to duplicate the folder.
This would however not retain the original file permissions. The other downside is that Google Drive will have to reupload all the copied files whereas in the previous case, the copying happened on Google servers directly.

No comments:

Post a Comment