/ Published in: C++

Check if a file exists in Google Drive
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// Check if a file exists in google drive. // Author : Selva Kumar // Blog : slvakumr.com // Date : 30 October 2014 function CheckIfFileExists(name, mimeType){ var flag = false; var files = DriveApp.getFilesByType(mimeType); while (files.hasNext()) { var file = files.next(); if(file.getName() == name) { flag = true break; } } return flag; }
Comments
