class DriveApp method .makeCopy()

DriveApp is the Apps Script service.

.makeCopy() is the method name you will see after a dot in your code.

What it does

Creates a duplicate of a file in Drive.

Why it's used

  • Duplicate a template spreadsheet for each new project.
  • Snapshot a file before a risky bulk update.

Common errors

  • Forgetting parentheses on makeCopy. Write DriveApp.makeCopy(), not DriveApp.makeCopy or makeCopy by itself.
  • Skipping dots between chained calls. Each step needs a dot, like DriveApp.getFileById(id).makeCopy().
  • Adding spaces where they do not belong. Write DriveApp.makeCopy(), not DriveApp .makeCopy(), DriveApp.makeCopy (), or DriveApp . makeCopy().
  • Wrong capitalization. Use DriveApp and makeCopy, not driveapp or makecopy.

1 Snippets using this method

Explore

Related methods

1 Better Sheets tutorials

Automatic Weekly Backup of Google Sheets

Automatic Weekly Backup of Google Sheets

Discover how to Save Your Sheets Every Week Automatically

Related blog posts

Written guides about DriveApp.makeCopy().

Browse the blog