Well, I'm transferring a property of several files and I would like to omit the notification emails, I found some models right here in the library but I can not do it without my code, if someone can help me I'll be grateful
function folderTransfer()
{
var pas = DriveApp.getFolderById("ID");
var arquivos = pas.getFiles();
var me = 'email'; /* tirar este e-mail e deixar que seja qualquer prop.*/
var novoProp = 'email';
var pastas = pas.getFolders();
while (pastas.hasNext())
{
var pasta = pastas.next();
var pastaID = pasta.getId();
fileTransfer(pastaID, me, novoProp);
pasta.setOwner(novoProp);
pasta.removeEditor(me);
}
//Transferir pasta pai para novoProp
pas.setSharing(DriveApp.Access.PRIVATE, DriveApp.Permission.VIEW);
pas.setOwner('email');
pas.removeEditor('email');
function fileTransfer(pastaID, prop, novoProp)
{
var pasta = DriveApp.getFolderById('id');
var arquivos = pasta.getFiles();
while (arquivos.hasNext())
{
var arquivo = arquivos.next();
arquivo.setSharing(DriveApp.Access.PRIVATE, DriveApp.Permission.VIEW);
arquivo.setOwner('email');
arquivo.removeEditor('email');
}
}
}