Skip to content

Instantly share code, notes, and snippets.

/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@rvanweerd
rvanweerd / gist:646afd70dc3bfda7513026c3b5cf0e74
Created February 16, 2023 10:20 — forked from TurekBot/gist:6da5acd27f92c86dc68d3f6588eeb499
Iterates through all subfolders and files of the given folder and changes the owner from you to someone you specify.
/*
Script to iterate through Files/Folders in Google Drive and change Ownership.
Will only attempt change after getting the current Owner and checking for match
from 'Welcome' sheet.
See blog post for full details and original spreadsheet: https://www.pbainbridge.co.uk/2020/04/bulk-change-ownership-of-google-drive.html
Note:
> Current Owner will become an Editor - include option to remove them?
> New Owner will get an email for each item.