43

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?

1
  • 3
    just reading through the solutions here.....why why why did Google make such a simple thing so complicated to do?
    – Kidburla
    Mar 7 at 13:36

18 Answers 18

64

You can get all your data copy to your drive by using Google Colab.
Just follow the simple steps to get that.

  1. On your drive, create a shortcut to the shared folder
  2. Open https://colab.research.google.com/
  3. Create new Notebook
  4. Mount your google drive by doing the following:
from google.colab import drive
drive.mount('/gdrive')
  1. First right click on the shared folder, click 'Add Shortcut to Drive' to create a symlink of the folder to your drive. You can delete this afterwards.
  2. Type:
%cd /gdrive/MyDrive/<path to the link added in step 5>

The path will end with the link name, by default the same name of the shared folder you're copying from.

  1. Type pwd to check the current path. It should start like this /gdrive/.shortcut-targets-by-id/<unique-id>/yoursharedfoldernameetc.
    Copy this path.
  2. Run this:
!cp -r 'above-copy-path/.' '/gdrive/My Drive/destinantion-path'

And there you go. It will start copying all shared folder content to your destination folder.

13
  • 4
    from the very beginning of copying I get a lot of cp: cannot open '/gdrive/.shortcut-targets-by-id/0B7r...Smc/Name-of-shared-folder/subfolder/subfile.gsheet' for reading: Operation not supported with gsheets and gdocs, that seems to defy any usability.
    – sukhmel
    Jun 11 '20 at 15:56
  • Working for me, definitely gets an upvote!
    – leetbacoon
    Nov 20 '20 at 4:40
  • Can this be made into a script where you just input src and destination and then execute?
    – d-b
    Jan 6 at 15:36
  • 1
    @d-b not easily because mounting drive in Colab annoyingly requires user interaction.
    – daknowles
    Feb 23 at 13:58
  • 3
    !cp -r 'above-copy-path/.' '/gdrive/My Drive/destinantion-path' looks like a spare whitespace in 'My Drive', should be 'MyDrive' anyway, AWESOME trick Apr 14 at 12:27
6

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.
4
  • 6
    No... that's very expensive, especially if you are living on mobile internet or a slow connection... :-( Nov 6 '18 at 10:41
  • 1
    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. Mar 17 '19 at 13:16
  • 1
    Beware of the native Google documents (i.e. Sheet, Drawings, Docs, Forms, etc.) for which no content is "accessible" to the users out of the Google editors (e.g. website or native mobile apps). Drive will have to convert them in "actual" formats which is quite OK for Office-like docs (e.g. Sheet->Excel, Doc->Word, etc.) but not great for drawings which are flatened into JPG files (I'd have expected and preferred SVG format). Forms are also turned into HTML forms along with their data in a CSV file.
    – Attila
    May 5 '20 at 10:58
5
  1. Create a new Google Colaboratory Notebook
  2. Mount your Google Drive:-
    from google.colab import drive
    drive.mount('/content/gdrive')
    
  3. Copy via shell:-
    !cp -r '/gdrive/MyDrive/src/.' '/gdrive/MyDrive/dest'
    
4

Inspired by Hamza Safdar's answer, I created an end-to-end Colab for those who are not familiar with Python and Colab at here.

Screenshot: enter image description here

In case people can not access the Colab above, I also add the code as follows:

#@title Deeply copy shared folders in Google Drive
from google.colab import drive
import os

print('Mounting Google Drive...')
drive.mount('/gdrive')

src_path = '/gdrive/MyDrive/DE A1' #@param {type: 'string'}
assert os.path.exists(src_path), f"Source '{src_path}' doesn't exist!"

target_path = '/gdrive/MyDrive/Language/German' #@param {type: 'string'}
os.makedirs(target_path, exist_ok=True)
assert os.path.exists(target_path), f"Target '{target_path}' doesn't exist!"

target_path = os.path.join(target_path, os.path.basename(src_path))
print(f'Copying from "{src_path}" to "{target_path}"...')
os.makedirs(target_path, exist_ok=True)
!cp -rf "$src_path"/* "$target_path"  # also work when source is a shortcut
2

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.

3
  • 3
    This solution has the advantage over some of the others that it will preserve the format of Google Docs and Sheets on your Google Drive. For example, if you download and then re-upload a Google Doc, it will be converted to a docx file. Sometimes the layout will have changed due to this conversion.
    – Moot
    Sep 23 '19 at 7:21
  • Good solution. The only thing, however, is that the documents' update history is lost.
    – cawecoy
    Jul 3 '20 at 0:51
  • Worth noting that solutions like this also allow the provider (www.multcloud.com in this case) to read all your files. Whether they keep a copy, watch transfers, log, or keep logs is up to them.
    – joshfindit
    Mar 6 at 16:19
2

If your Google Account supports "Drive File Stream" https://www.google.com/drive/download/ - you can access the contents of the folder simply from Windows Explorer or the Command Prompt - and copy the files just as you would do on a local drive.

1

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.

1

What was Marikamitsos and Hamza Safdar said really works! Thank you so much, but I cannot both vote and comment on your post since I am a new member. I am here just to thanks Marikamitsos and Hamza Safdar and share with the others the details of the step.


Initially, tbh, as a common person that didn't know anything about Google Colab, I am very confused. I suffered trying many times. Eventually, I yell when it becomes a success. Hopefully, I can make it easy for someone who didn't know anything about Google Colab like me.


  1. Create a shortcut of the shared by right-clicking the folder => click "Add shortcut to Drive"

  1. Open the Google Colab website: https://colab.research.google.com/ => click Create a new Notebook

  1. Insert your drive by typing in that blank space :

from google.colab import drive

drive.mount('/gdrive')

Click a play button / Ctrl + Enter


  1. Then, they will ask "Enter your authorization code"

Simply just open the given URL => choose the same google account that contains your destination drive => allow access => you will get the authorization code

Copy the authorization code to the column "Enter your authorization code"

Click a play button / Ctrl + Enter


  1. Know the shared folder's address by typing in that blank space :

%cd /gdrive/My\ Drive/Name of shared folder

You must change the "Name of shared folder" with the name of your shared folder For example: %cd /gdrive/My Drive/Mango

Click a play button / Ctrl + Enter

It should appear the shared folder's address in the bottom like this: For example: /gdrive/.shortcut-targets-by-id/blabalabla/Mango


  1. The final step, create a new folder using the shared folder address and the address of folder that you want, by typing :

cp -r 'shared folder address' 'the address of folder that you want'

For example: !cp -r '/gdrive/.shortcut-targets-by-id/blabalabla/Mango' '/gdrive/My Drive/Orange'

Click a play button / Ctrl + Enter


Wait until the process is done. Hupla! Your shortcut of the folder shared file already copied into the folder that you give the name.

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.

1
  • Seems very slow. It says to copy 5000 files will take around 1 day.
    – Kidburla
    Mar 7 at 13:45
0

The proper, updated answer as per today (2020-06-24) for activate the previous available now hidden functionality for saving a Shared with Me folder into your Google Drive as an active working link available at your computer or drive, is to press Shift+Z and then click on the Shared Folder (ref.).

1
  • 1
    I think you're answering a different question. The OP is trying to make a separate copy of a folder. Shift + Z adds a folder to a second parent folder, without making a separate copy.
    – browly
    Jun 26 '20 at 20:34
0

I solved this conundrum using Rclone with the copy command.

(Short explanation: Rclone is an open-source command line tool for managing files and folders in cloud storage — it lets you copy, move, sync, list, and whatever else you would want to do with files.)

What you'll need to do:

  1. Install Rclone
  2. Set up a Google Drive remote for your My Drive (or a Shared Drive if you're using G Suite) using rclone config. A "remote" is just a cloud storage location that you've added to rclone, so it has credentials to access it. This takes several steps — the instructions are easy to follow, but refer to the Google Drive remote docs for all the details. (NB: make sure you're setting up a Google Drive remote and not a Google Cloud Storage one!)
  3. Once you've added the remote, you can use rclone copy to copy the contents of one directory in the remote to another directory in the same remote (if you want to copy to a different Drive or Shared Drive, you'll need to add a second remote for that). The full command will be something like: rclone copy my-drive-remote:some/path/to/original-folder-I-dont-own my-drive-remote:some/path/to/new-folder-I-own.
  4. Confirm in the Drive web UI that the new folder contains everything, and that you're the owner of the newly-created files.

Refer to the rclone copy docs for additional parameters. Defaults should be fine unless you're moving lots of files or very large files.

Some extra notes:

  • This does copy Google docs, sheets, etc in their original format, although it may go through a conversion from gdoc > docx/xlsx/etc > back to gdoc. I haven't noticed any problems.
  • File permissions are inherited from the new folder. If the originals were shared specially with anyone, they won't have access to the new files.
  • Version history seems to be lost.
  • Creation date on all the files is set to now.
0

I found somewhat a simpler solution here.

  1. Open the drive
  2. Install the add-on (search: 'Copy URL to Google Drive')
  3. Make a copy of the shared folder in your Drive
  4. Make a target folder
  5. Use the add-on:
    • Login and Authenticate
    • Select the folder from the drive
    • Select the target folder
    • Start 'Copy'
  6. Wait
  7. Done

Please comment if something not works. Please like the video (it's not mine but sure it is helpful)

1
0

enter image description here

Make a copy of the files inside the shared folder. Drag all copies to your Google Drive folder on the left panel. Done!

enter image description here

0

I was suffering from same problem then I got solution by my own,

  1. go to the folder shared with me
  2. open the folder which you need to make your own ownership and in your drive
  3. select all the items in the folder
  4. right click and select create a copy
  5. problem solved files item will be in your drive
0

If you guys have some error when using Google Colab methods like this:

"cp: error reading '...' Input/output error"

try this command:

!sudo cp -v -r '/content/drive/.shortcut-targets-by-id/<some-id>/<name-of-folder>/.' '/content/drive/MyDrive/<name-of-destination-folder>'

just replace !cp with !sudo cp -v -r. It works for me.

-1

4
  • 2
    Add to My Drive doesn't really work as I was expecting. It only adds the link, but not the content itself. 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
  • 1
    It does not copy the files in my drive. This was mentioned in the linked question. Sep 7 '18 at 6:24
  • It doesn't copy the files - which means if the original files are modified/deleted, they will be in your drive as well. this defeats the purpose of a copy, which is why it's called just a "link".
    – Kidburla
    Mar 7 at 13:39
-1

As of January 2021, this functionality is built in:

First share the folder and give the recipient all permission:

enter image description here

Now close all dialogues and return to the "start view" of Google Drive. Again right click -> Share on the folder you shared in the previous step. Select the recipient and click the pop-up menu. Now, there is an option "Make owner"

enter image description here

By selecting this, the folder is moved from the recipients Shared with me to the "root" of his/her drive. The recipient can now remove the original owner through the same share menu to make the folder his/her own folder.

1
  • This only works if you are the owner of the original files and hence can change the permissions in this way. In many cases, someone (who you may not even know, e.g. someone on an online forum) gave you a link to a shared folder; you can't ask them to follow this process.
    – Kidburla
    Mar 7 at 13:40
-2

I find with "Google Drive" app on Android, there's an option "Move" for shared folder. And with this option, it is able to copy the folder to your own drive. But I don't understand why the option is not available on web and iOS...

1
  • I just checked on Android and I can't see this option
    – Kidburla
    Mar 7 at 13:44

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