Register your interest: Tag @Cody, get an agent
BlogResources

Duplicate a folder in Google Drive: the methods that work

Four working methods compared step by step, with the Apps Script that handles nesting, how long each takes on a large folder, and which to choose for your situation.

Rithul PalazhiRithul Palazhi10 min read

Summarize with AI

Duplicate a folder in Google Drive: the methods that work
On this page

Four methods duplicate a Google Drive folder reliably. They differ in how long they take, whether they need any technical knowledge, and how much control you get over the result. This page walks through each one with the steps, then gives you a straight recommendation based on what you are actually trying to do.

For what gets lost in the process, and why Drive has no folder copy button in the first place, see can you duplicate a folder in Google Drive.

What we'll cover

Method 1: Google Drive for desktop

The most reliable option for a one-off copy, and the only one requiring no technical knowledge at all. Drive for desktop mounts your Drive as a drive letter or volume, so an ordinary copy and paste in File Explorer or Finder does the work, and the sync client pushes the result back up.

  1. Install Google Drive for desktop and sign in, if it is not already running.
  2. Open the mounted Google Drive volume in File Explorer or Finder.
  3. Navigate to the folder you want to duplicate, right-click it and choose Copy.
  4. Move to the destination, right-click and choose Paste.
  5. Wait. The client downloads everything it does not already hold locally, writes the copies, then uploads them.

Nesting is preserved correctly, which is the main thing, and no file types are skipped. The cost is time and disk space: every file passes through your machine in both directions. On a folder of a few hundred megabytes this is a coffee break, and on a folder of eighty gigabytes it is an afternoon and a laptop you cannot close.

Two practical notes. Set the folder to Available offline before you start, so the download finishes before the copy begins rather than stalling partway. And watch your local free space, because streamed files become real files during the operation.

Method 2: copying files in the browser

Fastest for a simple case, and actively misleading for a complicated one.

  1. Open the source folder in Drive in your browser.
  2. Select everything with Ctrl+A or Cmd+A.
  3. Right-click and choose Make a copy. Drive creates every copy in the same folder, each prefixed with "Copy of".
  4. Select the new copies, right-click, choose Organize then Move, and pick your destination.

This takes under a minute and works properly when the folder contains only files. The limitation that catches people is that subfolders are not copied, and Drive does not warn you. Select-all in a folder containing three documents and two subfolders copies the three documents. The subfolders are simply not part of the result, and unless you counted beforehand, nothing signals that anything is missing.

Use this when you can see the entire contents on one screen and there are no subfolders. Otherwise use another method.

Method 3: Google Apps Script

The right tool when you need control: specific file types only, a naming convention, or a copy that runs against a folder too large to pull through a laptop. It runs on Google's infrastructure rather than your machine, so nothing downloads.

Open script.google.com, create a new project, and paste this in:

function copyFolder(sourceId, destinationParentId, newName) {
  const source = DriveApp.getFolderById(sourceId);
  const parent = DriveApp.getFolderById(destinationParentId);
  const target = parent.createFolder(newName || source.getName() + " copy");

  const files = source.getFiles();
  while (files.hasNext()) {
    const file = files.next();
    file.makeCopy(file.getName(), target);
  }

  const folders = source.getFolders();
  while (folders.hasNext()) {
    const child = folders.next();
    copyFolder(child.getId(), target.getId(), child.getName());
  }

  return target.getId();
}

function run() {
  const id = copyFolder("SOURCE_FOLDER_ID", "DESTINATION_PARENT_ID", "New folder name");
  Logger.log("Created: " + id);
}

Replace the two IDs with your own. A folder ID is the string after /folders/ in the URL when you have the folder open. Run run, approve the permissions prompt the first time, and check the execution log.

The recursion is the part that matters: the function calls itself for every subfolder, so the whole tree is recreated at any depth.

Its real constraint is the execution time limit. Consumer accounts get six minutes per run and Workspace accounts thirty, and a large tree will hit that ceiling and stop partway, leaving a half-finished copy. For anything approaching a few thousand files, the script needs to track its progress and resume, which is a meaningfully harder piece of code than the one above.

Method 4: an automation on a trigger

The three methods above are all things a person does. When the duplication happens repeatedly, what you want is for it to happen on its own: a template folder copied for every new client, every new project, every new matter, with the naming convention applied and the right people given access.

Built this way, the copy stops being a task anyone remembers to do. A deal moves to closed-won, or a form is submitted, or a row appears in a sheet, and the folder structure exists a moment later with permissions already set.

On CodeWords you describe that in plain language: which template to copy, what to call the result, where to put it, who should have access, and what should happen if something fails. Cody, the automation builder, builds it, connects it to Drive and to whatever triggers it, and deploys it. Automations connect to more than 3,000 integrations, which covers the CRM, form, and spreadsheet tools that usually supply the trigger. The free plan covers light use, with Pro at $39 per month and Business at $100 per month as usage grows; details are on the pricing page.

The practical advantage over the script is that the time limit stops being your problem, failures are reported rather than silent, and changing the naming convention later is a sentence rather than an edit to code that only one person understands.

Which method should you use

SituationMethod
One small folder, no subfoldersBrowser copy
One folder with subfolders, one timeDrive for desktop
Large folder, too big to downloadApps Script
Specific file types or naming rulesApps Script
The same copy, repeatedlyAutomation
Triggered by a form, CRM or sheetAutomation
Backup outside Google's ecosystemDrive for desktop, then archive locally

The honest dividing line is how many times you will do it. Once is a manual job and the desktop client handles it with the least fuss. Three times a week is a system, and building it properly costs less than the accumulated hours of doing it by hand, plus the occasions when somebody forgets.

Copying into a shared drive

Shared drives are the common destination for a duplicate that a team needs, and they behave differently enough to be worth separate steps.

Copying within a single shared drive is the easiest case. Ownership stays with the drive rather than moving to you, nothing counts against your personal quota, and everyone with access to the drive can see the result as soon as it exists. Any of the four methods works.

Copying from My Drive into a shared drive transfers ownership to the drive, which is usually what you want for work that should outlive your account. You need at least Contributor access on the destination. The desktop client handles this transparently, and a script needs the destination folder ID from the shared drive rather than from My Drive.

Copying from a shared drive into My Drive makes you the owner of the copies and charges them to your quota. This is the direction to be careful about, both because of the storage and because the content leaves the governance the shared drive was providing.

Copying between two shared drives is permitted where you have appropriate access to both, and is the cleanest way to hand a structure from one team to another. Check the destination drive's item limit before starting on anything large, since shared drives cap total items and a bulk copy is the operation most likely to reach it.

One behaviour catches people out repeatedly: a duplicate placed in a shared drive is visible to that drive's members immediately, with no sharing step. If you are duplicating a folder to work on a draft privately, a shared drive is the wrong destination.

When a copy goes wrong

The copy finished but files are missing. Compare counts on both sides before assuming success. The usual causes are a browser copy that skipped subfolders, or view-only files whose owners disabled copying.

The script stopped partway. It hit the execution time limit. The half-finished copy is still there and should be deleted before retrying, or you will end up with duplicates of the part that did complete.

Everything landed in one flat folder. A browser copy on a nested folder. Use the desktop client or the script instead.

Colleagues cannot see the new folder. Permissions do not travel with copies in My Drive. Share the duplicate explicitly, or place it in a shared drive where access is inherited.

Storage filled up unexpectedly. Copies are new files counted against the owner's quota. Duplicating a large media folder consumes the same space again.

A copied Google Form collects nothing. The link between a form and its response spreadsheet does not survive copying. Reconnect the destination on the new form.

Frequently asked questions

Can I duplicate a folder in one click?

Not in Drive itself. Extensions and add-ons that offer a button are running one of these methods with the Drive access you grant them, which is worth considering before pointing one at a sensitive folder tree.

Will sharing permissions come across?

Not in My Drive: each copy is a new file shared with nobody, and you reapply access afterwards. Within a shared drive, access is inherited from the drive, so a copy placed there is immediately visible to that drive's members.

Can I copy Docs and Sheets without converting them?

Yes. Every method here copies Google-format files as Google-format files. Conversion only happens if you deliberately download them as Office or PDF files on the way through, which is a reason to prefer the methods that stay inside Drive.

How long does a large folder take?

With the desktop client, expect it to be governed by your connection speed in both directions, since everything downloads then uploads. Apps Script is considerably faster because the copying happens inside Google's infrastructure, up to the point where it hits the execution limit. An automation has neither constraint.

Can I copy a folder to someone else's Drive?

You can copy it into a folder they have shared with you, or into a shared drive you both belong to. You cannot write directly into another person's My Drive, and the copies you create will be owned by you regardless of where they sit.

Is there a limit on how deep the nesting can go?

My Drive is generous enough that depth is rarely the constraint. Shared drives enforce firmer limits on nesting and total item count, and a bulk duplication is the operation most likely to find them.

Which method is safest for important content?

Apps Script or an automation, because both can report exactly what they did. The desktop client is reliable but tells you nothing beyond finishing, and the browser method omits subfolders without comment. For anything you would be upset to lose part of, pick a method that produces a count you can check against the source.

Can I schedule a copy to run overnight?

Not with the desktop client or the browser, both of which need you present. Apps Script supports time-based triggers, and an automation platform handles scheduling as a standard feature along with reporting the outcome somewhere you will see it in the morning.

Get started today

Your first workflow is free to build.

Describe what you need. Cody handles the build, the connections, and the deployment.