尝试使用以下方法升级它:
function checkFile2(filename,foldername){
var folder = DriveApp.getFoldersByName(foldername);
Logger.log(folder.hasNext());
//Folder does not exist
if(!folder.hasNext()){
Logger.log("No Folder Found");
}
//Folder does exist
else{
Logger.log("Folder Found")
var file = folder.next().getFilesByName(filename);
if(!file.hasNext()){
Logger.log("No File Found");
}
else{
Logger.log("File Found");
}
}
}
我无法按照声明获得此版本v3。
有没有人设法得到它?
谢谢!