productiveGuser.com

Create a Folder in Google Drive

Posted By: Harish
create google drive folder

Open your Google Drive account.

Find the New button at the top-left corner of the drive's home.

create google drive folder

Click on the button to get a list of all available options.

create google drive folder

Select New Folder option to create a new folder.

A new dialog box will open and prompts to enter the name of the folder.

create google drive folder

Enter a name for the folder and click on create to add a new folder to your google drive.

Create a New Folder in Google Drive using Google Apps Script

By using Google Apps Script, we can create a new named folder by running a simple script.

Open Google Apps Script editor and create a new project.

A Code.gs file will be opened in the Apps Script editor.

Now add below function

function createFolder() {
  const newFolder = DriveApp.createFolder('Drive Test Folder');
  const folderLocation = newFolder.getUrl();
  Logger.log(folderLocation);
}

Now click on the save icon (floppy disk icon) and run the code by clicking on Run.

In the execution window, the newly created folder's link will be logged.

Check to run a simple and basic google apps script post for more info on executing a script.

create google drive folder

Open that link in the browser to visit the newly created google drive folder.

Share is Caring

Related Posts