AppsScriptPulse

Bulk rename files in Google Drive

Screenshot of File renamer text fields

Screenshot of File renamer text fields

This is designed to automate bulk renaming of multiple files within a single Google Drive folder. It has been developed as a Google Sheet with flexibility towards entering your own search pattern and replacement string as you see fit.

Source: The Gift of Script: Bulk rename files in Google Drive

Bulk create Google Drive folders from a Google Sheet

The following Google Apps Script code was developed to bulk create Google Drive folders with data from a given spreadsheet (eg to name the folders and add permissions). It uses the Module Name and Marker to form the folder name as it iterates through each row in turn. At the same time it takes the Marker Email Address and uses the ‘DriveApp’ to provide edit access to the folder. Finally it creates another sub-folder in each folder as an extra.

Source: The Gift of Script: Bulk create Google Drive folders

How to backup Google Photos to Google Drive automatically after July 2019 with Apps Script

Easy to configure apps script to continue backing up your Google Photos to Google Drive after the July 2019 change. You just need to change two lines of the script to get this running with your Google Photos account.

Source: How to backup Google Photos to Google Drive automatically after July 2019 with Apps Script

Transfer owner rights under Google Drive folder at once with Google Apps Script-Qiita

Yuki Tanabe provides some Google Apps Script code that can change the owner permissions of all folders and files in a particular folder in Google Drive

Source: Transfer owner rights under Google Drive folder at once with Google Apps Script-Qiita

Change Google Drive Folder color with Apps Script – Stéphane Giron – Medium

In Apps Script you can use the DriveApp service to manage your files and folders, but the methods getColor and setColor do not exist. You can use the drive advanced service to query the API directly but with recent change you will have to activate the Drive API in GCP and will need a GCP project. To have a smooth integration and skip the Google Cloud project creation here is a function to manage Folder color in Apps Script. These functions queries the API directly with UrlFetchApp() service.

Source: Change Google Drive Folder color with Apps Script – Stéphane Giron – Medium

How to deal with Google Drive API for Team Drive + some Apps Script code, now use the new Drives resource collection

How to use Google Drive API for Team Drive in Apps Script with specific focus for Administrator of G Suite domain to list Team Drive, view Sharing Settings and more

Source: How to deal with Google Drive API for Team Drive + some Apps Script code, now use the new Drives resource collection

Google Drive as cache – Desktop Liberation

If you are after performance and self cleansing then the CacheService is the best solution for caching, and if you are after permanence and small amounts of data, the properties service is a good solution. You can also get round many of the limitations of each service using my properties and cache plugins, covered in Squeezing more into (and getting more out of) Cache services

Source: Google Drive as cache – Desktop Liberation