Tuesday, 24 August 2021

Bulk create Google Drive Folders and add Files

The following Google Apps Script tool was developed to bulk create Google Drive folders with optional files copied in to each one, all from data within a Google Sheet. There is also the option to add specific 'edit' permissions to the newly create Drive folders of which the files would automatically inherit this access level.

The tool is an expansion of the 'Bulk create Google Drive folders 2.0' blog post here, so you may wish to read and watch the video on there first. Also note I have version 2.0 of this tool available now.

Bulk create Google Drive folders and add files, from a Sheet of data
Bulk create Google Drive folders and add files, from a Sheet of data


Key Functionality
  • Complete the necessary information in the Config sheet before proceeding. Then use the Create folders option from the Admin menu at the top of the Google Sheet.
  • Adding permissions is optional - use the Config sheet to change the dropdown as required. If you select 'No' then the usual Google Drive inheritance will occur based on the parent Google Drive folder.
  • You can add multiple File IDs into the relevant cell and they can be different for each row. Leaving this cell blank/empty means no files will attempt to be copied into the new folder.
  • The original filename will be updated during the copy to append the folder name to the end of it, in order to prevent creating a large number of files with identical names.
  • There is a Log sheet to help troubleshoot any errors which may occur when running the tool.


Concatenation

Create those useful descriptive folder/file names so items are easier to search for in the future. Concatenate will let you combine values that may exist in different columns in another spreadsheet for example, or take those folder names and prepend/append words around them. Concatenate guide webpage here.

 


Download
Bulk create Google Drive Folders and add Files download here (please use 'File' > 'Make a copy' for your own version).

6 comments:

  1. I have a question about this script...I posted it on your YouTube comments

    ReplyDelete
    Replies
    1. Hi Jeff

      No problem, I've replied to your query: https://www.youtube.com/watch?v=NjcGXft4o-o

      Kind regards
      Phil

      Delete
  2. Hello,

    First of all thank you for amazing script, Just wanted to ask the folder are created now and we wanted to add files in the created folder how we able to do that.

    Thank you

    Sylvester Samson

    ReplyDelete
    Replies
    1. Thank you Sylvester

      The idea of this tool is to add the files during the creation of the folders, not after. Please note I have a newer version of this tool which you may prefer instead: https://www.pbainbridge.co.uk/2021/11/bulk-create-google-drive-folders-and.html

      Kind regards
      Phil

      Delete
  3. Hi Phill,

    Thanks so much for your amazing work. I wanted to know if you have worked on a method of copying a non Google file stored in Google Drive to another folder? Similar to what you have defined and developed here but copying MS-Word or MS-Excel files.

    Regards

    Mike

    ReplyDelete
    Replies
    1. Thanks Mike!

      I'm afraid not currently - it is on my radar as a few people have mentioned a tool like that. I've just been unable to get time to develop one currently.

      Kind regards
      Phil

      Delete