Get files in Drive by filename

PHOTO EMBED

Thu Feb 03 2022 17:19:34 GMT+0000 (Coordinated Universal Time)

Saved by @MakiProductions

//Returns files in Google Drive that have a certain name.
function findFilesInDrive(filename) {
  var files = DriveApp.getFilesByName(filename);
  var result = [];
  while(files.hasNext())
    result.push(files.next());
  return result;
}
content_copyCOPY