Открыть и редактировать текстовый файл на google диск через google script

Как открыть и редактировать текстовый файл на google диск через google script?

var nameFile = "price";
     var folders = DriveApp.getFoldersByName(nameFile); // replace by the right folder name, assuming there is only one folder with this name
     var folder,thisFile,idToDLET;
     
     while (folders.hasNext()) {
      var folder = folders.next();
     }
      var allFiles = folder.getFilesByName(nameFile);
     while (allFiles.hasNext()) {//If there is another element in the iterator
        thisFile = allFiles.next();
        
     }  
     thisFile.Open();

Ответы (0 шт):