title: how to update google drive text file via google script?
body: <p>I want Google script variable data into Google drive as text file and update that text file regulatory via Google script!</p>
  
  <p>The following code creates a text file and writes the data on it.I wonder how i can update the text file later ? </p>
  
  <pre><code>function createTextFile()
  {
  
    name="testFile.txt";
    name2="testFolder";
  
    var content = "this is text data to be written in text file";
  
  var dir = DriveApp.getFoldersByName(name2).next()
  var file = dir.createFile(name, content);
  }
  </code></pre>