May 27, 2026

How to copy an entire folder in Google Drive: guide

Reading time :  
7
 min
Rithul Palazhi
Rithul Palazhi

How to copy an entire folder in Google Drive: the complete guide

Here's something Google still hasn't built: a "Copy folder" button. You can copy individual files in Google Drive, but copying an entire folder — with its subfolders, nested files, and structure intact — requires a workaround. It's one of those missing features that sends thousands of users searching for answers every month.

Google Workspace surpassed 3 billion users in 2024 (Google Cloud blog, 2024), and Google Drive is the backbone of document management for most of them. Yet the platform still expects you to manually duplicate files one by one, or find creative solutions. On CodeWords, you can automate the entire process — including subfolders, permissions, and file conversions — with a single workflow.

Unlike generic AI automation posts, this guide shows real CodeWords workflows — not just theory. You'll learn every method for copying a Google Drive folder, from manual clicks to fully automated scripts.

TL;DR

  • Google Drive has no native "copy folder" feature — you can only copy individual files through the UI
  • Google Apps Script or the Drive API can recursively copy folders with subfolders and files
  • CodeWords automates folder duplication including structure, permissions, and scheduling for recurring needs

Why doesn't Google Drive have a copy folder feature?

This isn't an oversight — it's a design constraint. Google Drive files aren't stored like files on your hard drive. Each file is a database object with metadata, sharing permissions, comments, version history, and links to other Google services. Copying a folder means duplicating all of that context for every file inside it, recursively.

Questions arise: Should copied Google Docs retain edit history? Should shared permissions carry over? Should linked Sheets references point to the original or the copy? These ambiguities are likely why Google hasn't shipped a simple "Duplicate" option for folders.

Understanding this helps you pick the right method. A simple manual copy works for small folders. Automation tools are essential when you're dealing with nested structures, hundreds of files, or recurring needs like project templates.

How do you manually copy a folder in Google Drive?

For small folders (under 20 files with no subfolders), the manual method works:

  1. Open the folder in Google Drive
  2. Select all files — click the first file, then press Ctrl+A (or Cmd+A on Mac)
  3. Right-click and select "Make a copy"
  4. Move the copies to your target location — they'll appear in the same folder with "Copy of" prefixes

The problems with this approach multiply fast:

  • Subfolders aren't copied. Google Drive only duplicates the files, not the folder hierarchy. You'll need to recreate subfolders manually and move files into them.
  • File names get cluttered. Every copy is prefixed with "Copy of," requiring bulk renaming.
  • Permissions don't transfer. Copied files are owned by you, with no sharing settings from the originals.
  • Google Shortcuts break. Any shortcuts within the folder won't point to the copied versions.

This method is fine for a quick one-off. For anything larger, you need automation.

How do you copy a folder using Google Apps Script?

Google Apps Script is the free, built-in way to automate Drive operations. Here's a function that recursively copies an entire folder:

function copyFolder(sourceFolderId, targetFolderId) {
  var source = DriveApp.getFolderById(sourceFolderId);
  var target = DriveApp.getFolderById(targetFolderId);
  copyFolderContents(source, target);
}

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

  var subfolders = source.getFolders();
  while (subfolders.hasNext()) {
    var subfolder = subfolders.next();
    var newFolder = target.createFolder(subfolder.getName());
    copyFolderContents(subfolder, newFolder);
  }
}

To use it:

  1. Go to script.google.com and create a new project
  2. Paste the code above
  3. Replace the folder IDs (found in the URL when you open a folder in Drive)
  4. Click Run and authorize the script

This handles subfolders and preserves file names. The limitation: Apps Script has a 6-minute execution time limit per run. For folders with hundreds of files, the script may time out before completing. You'd need to implement continuation tokens or batch processing — which is where a platform like CodeWords simplifies things significantly.

How do you automate folder copying with CodeWords?

CodeWords removes the execution time limits and adds intelligence to the process. Using the Google Drive API through CodeWords' native integrations, you build a workflow that:

  1. Recursively traverses the source folder using the Drive API's files.list endpoint
  2. Creates matching subfolders in the target location
  3. Copies files with original names, maintaining the hierarchy
  4. Optionally transfers permissions from source to destination

Because CodeWords runs on serverless infrastructure with no time limits, folders with thousands of files copy completely. Schedule recurring copies for weekly project snapshots or duplicating template folders for new clients.

The platform's Google Drive integration handles OAuth credentials and authentication so you're not managing service accounts or token refresh manually. Browse templates for pre-built Drive workflows.

What about third-party tools for copying Drive folders?

Zapier and Make can move and copy individual files triggered by events, but neither supports recursive folder copying natively. You'd need complex multi-step scenarios. Google Takeout exports Drive contents as a ZIP — not a Drive-native copy — requiring re-upload and restructuring.

For most automation-minded users, the choice comes down to Apps Script (free, limited by execution time) or a platform like CodeWords (no limits, adds AI capabilities). If you need to copy folders as part of a larger workflow — onboarding new team members, creating client workspaces, organizing sheets by date — CodeWords handles the orchestration.

What should you watch out for when copying Drive folders?

Storage quotas. Copies count against your Google Drive storage. Google's free tier includes 15 GB shared across Drive, Gmail, and Photos (Google One, 2024). Google-native files (Docs, Sheets, Slides) copied via the API stay quota-free, but exported formats consume storage.

Shared Drive limitations. Copying between personal Drive and Shared Drives has different permission models. The Drive API's copy endpoint handles both, but you need appropriate access on the destination Shared Drive.

Link references break. If a Google Doc links to other files in the original folder, those links still point to the originals — not the copies. Updating internal references requires additional scripting.

FAQ

Can I copy a folder to a different Google account? Not directly through Google Drive's UI. You need to share the folder with the target account, then use Apps Script or the Drive API (via CodeWords) to create copies owned by the target account. Alternatively, use Google Takeout to export and re-upload.

Does copying a folder preserve file version history? No. Copied files start with a single version. The original version history remains on the source files only. This is a limitation of Google Drive's copy behavior.

How long does it take to copy a large folder? It depends on the number of files, not total size. The Drive API processes about 10-20 copy requests per second. A folder with 1,000 files takes roughly 1-2 minutes through the API. Apps Script may take longer due to its execution overhead.

Can I schedule automatic folder copies? Yes. On CodeWords, you can set up cron-based schedules to copy folders at any interval — daily backups, weekly project snapshots, or monthly archives.

Folder copying is a workflow, not a feature

Knowing how to copy an entire folder in Google Drive is useful. Automating it transforms a tedious manual task into a reliable workflow — project templates that spin up in seconds, backups that run without human intervention, and client workspaces that create themselves.

Google may eventually ship a native copy folder button. Until then, automation fills the gap. CodeWords gives you the Google Drive API integration, serverless execution, and scheduling tools to build folder workflows that run on autopilot. Start your first Drive automation at codewords.agemo.ai.

Contents
Ready to try CodeWords?
Get started free
Sign in
Sign in