class DriveApp method .createFolder()

DriveApp is the Apps Script service.

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

What it does

Creates a new folder in Drive.

Why it's used

  • Make a new client folder when a deal closes.
  • Keep uploads organized by month or project automatically.

Common errors

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

Explore

Related methods

Better Sheets tutorials

Automatic Screenshots in Apps Script

Automatic Screenshots in Apps Script

How To Download All Tabs as CSV in a Zip File

How To Download All Tabs as CSV in a Zip File

Download All Tabs as CSV in a Zip File, instead of downloading each one ...
Take Screenshots from URLs in Google Sheets

Take Screenshots from URLs in Google Sheets

Use Screenshot One api to quickly get cached images of Screenshots and t...
Visicalc 2023 Design Walkthrough

Visicalc 2023 Design Walkthrough

Design walkthrough of VisiCalc 2023. Watch this if you'd like to see the...
Visicalc 2023 Quick Walkthrough

Visicalc 2023 Quick Walkthrough

This is a fun template I created for April 1st. Take a quick walk throug...

Related blog posts

Written guides about DriveApp.createFolder().

Browse the blog