Pete Chadwick
Pete Chadwick

Reputation: 9

Auto dated google drive folder on upload

I have been out of the programming world for some time and so am looking for any help that you may be able to provide.

I am trying to create a Google drive set up that automatically creates a new folder that is titled "mm/dd/yyyy" when it receives it's first upload of the day. The files will then continue to automatically be assigned to that folder until a 12.01am the next day, which is when another new folder would be generated once an upload is completed on that day...etc etc. Ideally the script would not create a mandatory folder every day as there will not be uploads everyday, it would only take action once the "command" of a file, photo, video is being uploaded.

Any help would be a massive help. Thanks guys.

P.s no I do not have a script to share I am relearning as we speak.

Upvotes: 0

Views: 171

Answers (1)

Jessica Rodriguez
Jessica Rodriguez

Reputation: 2974

You can create a programmable pattern for this.

  1. Create a folder using Files:create api. See documentation
  2. Set a logic when you want to upload a file/photo/video using Files:insert or Files:update. See Files Insert and Files update.
  3. When there's an update from your folder created, you can use the property:

    enter image description here

  4. Pass that property as date format "mm/dd/yyyy" to Files:update:

    enter image description here

  5. This will trigger again the Files:create api.

For more informations:

Upvotes: 0

Related Questions