0

It seems like the Make a Copy option only works for individual files (not for folders).

When somebody shares a folder with me on Google Drive, how can I make a copy of that folder in my own Google Drive account?

2

Sounds like you want a deep copy without any previous reference to the original folders & documents. Under these circumstances:

  1. Download the folder.
    Download
  2. Extract content
  3. Upload to your drive.
  • 1
    No... that's very expensive, especially if you are living on mobile internet or a slow connection... :-( – Ionică Bizău Nov 6 '18 at 10:41
  • True, but it will work. If you have a better solution, write it up. Working on a Cloud Drive already has certain expectations regarding connectivity and bandwidth. – StampedeXV Nov 6 '18 at 13:42
  • Looks like it's the only workable solution. I am curious why Google didn't create something more straightforward way of doing that and we have to invent a workaround. You may need that for 2 simple reason: 1. To be sure that this folder will be safe on your drive even if the owner deletes it. 2. You may want to rename the content of the folder. – Andrew Anderson Mar 17 at 13:16
0

A Google Drive migration extension is available in Chrome extensions store, you can copy the entire folder with that.

Download extension from here. https://chrome.google.com/webstore/detail/drive-migrator/nakklajdcijlkfagghhcdofbgbhddoed?hl=en

Step1 : Install extension in chrome browser.
Step2 : Open your Google drive account (primary) where all your file exists.
Step3 : Share that particular holder to your secondary Gmail account.
Step4 : Open your secondary Gmail account, select the shared folder and copy all the files with the extension.
Step5 : Now go to Primary account folder and delete.

0

I just had exactly the same issue. And I copied everything successfully via this open-source service: https://github.com/ericyd/gdrive-copy

After you finish your copy, do remember to revoke your granted permission to this app.

0

Here's another way to copy a folder with an external application:

  1. Add the folder to "My Drive".
  2. Open your account with a website: www.multcloud.com
  3. Find the folder - and create a copy into the account.

*The service is free up to 50 gigabytes per month.

0

I too had similar requirements. I wrote a script for duplicating the whole folder. You can use Google app scripts for drive operations (https://developers.google.com/apps-script/reference/drive/).

Following is a sample script you can expand upon. Change fromFolderID and toFolderID:

function DuplicateFolder() {
  var fromFolderID = '1pDOJWgzjpjRaJORDNdMqQXPnGTwvDhHE';
  var toFolderID = '1Ead3gxUKaXhOrCbCs4buQQgt0ZB52Wv7';
  var fromFolder = DriveApp.getFolderById(fromFolderID);
  var childFolders = fromFolder.getFolders();
  var toFolder = DriveApp.getFolderById(toFolderID);
  var time = new Date().toLocaleTimeString().replace(/:\d+ /, ' ');
  var toFolderParent = getOrCreateSubFolder(fromFolder.getName(),toFolder);
  var toFolderChild = toFolderParent .createFolder(Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 6) + '_' + time);
  while (childFolders.hasNext()){
    var childFolder = childFolders.next();
    var toCurrentFolder = toFolderChild.createFolder(childFolder.getName())
    var fromFiles = childFolder.getFiles();
    while(fromFiles.hasNext()){
      var file = fromFiles.next();
      file.makeCopy(toCurrentFolder);
    }
    Logger.log('Coppied: ' + childFolder)
  }

}


function getOrCreateSubFolder(childFolderName, parentFolderName) {
  var newFdr =""

  try {
    newFdr = parentFolderName.getFoldersByName(childFolderName).next();
  }
  catch(e) {
    newFdr = parentFolderName.createFolder(childFolderName);
  }

  return newFdr
}

Also, check out https://www.hongkiat.com/blog/google-drive-google-apps-scripts/ for some other interesting scripts to understand how to work with Google App Scripts.

-1

  • 1
    Add to My Drive doesn't really work as I was expecting. It only adds the link, but not the content itself. – Ionică Bizău Sep 6 '18 at 17:23
  • @IonicăBizău what do you mean by "only adds the link" ? – user0 Sep 6 '18 at 17:35
  • It does not copy the files in my drive. This was mentioned in the linked question. – Ionică Bizău Sep 7 '18 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.