title: Update Single Sheet in All Files in Folder and Subfolders
body: <p>So, I've been tasked with the writing of code that will go through all files within current folder of Google Drive and update a specific sheet called "Artifacts and Evidence," located in the fourth tab, with the contents on the sheet which the script runs.  This all worked really well and I was able to share this sheet with my team of administrators.  EXCEPT....</p>
  
  <p>One administrator is in charge of two buildings.  Therefore she has folders and sub folders and sub-sub folders that contain the Google Sheets that need updating.  Therefore, I need to modify this code to:</p>
  
  <p>1) search all files and subfolders within the current folder.
  2) search the file name to see if it contains the text "18/19 supersheet" as she renamed each file with a person's name followed by this text (EX: Smith, John - 18/19 supersheet)
  3 if the title matches, then to essentially run the script I already have to update that file with this new information.</p>
  
  <p>I cannot, for the life of me, find how I can search all files, including those within subfolders and then check the title to see if it contains the correct information.  Keep in mind, that this "sheet" will only be in the "root" folder, so some bebopping between folder names will be needed.  THANK YOU in advance for your help.  This has been driving me crazy!</p>
  
  <pre><code>// Function to copy sheets from one file to others in folder
  function onOpen() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var pasteSheet = [ {name: "lick to Copy Tab to all Sheets in Folder", functionName: "copySheet"}];
    ss.addMenu("Copy to EE", pasteSheet);
  }
  
  function copySheet() {
    var source = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = source.getSheets()[3];  // Change number to sheet number with index 0 ex: sheet 1=0, sheet 2=1, etc.
    var sourceFile = DriveApp.getFileById(source.getId());
    var sourceFolder = sourceFile.getParents().next();
    var folderFiles = sourceFolder.getFiles();
    var thisFile; 
    var ss1 = SpreadsheetApp.getActiveSpreadsheet();
    //var sheets1 = ss1.getSheets();
  
    while (folderFiles.hasNext()) {
      thisFile = folderFiles.next();
      if (thisFile.getName() !== sourceFile.getName()){
        var currentSS = SpreadsheetApp.openById(thisFile.getId());
        sheet.copyTo(currentSS);
        currentSS.getSheets()[currentSS.getSheets().length-1].setName('THIS WAS COPIED');
        currentSS.setActiveSheet(currentSS.getSheetByName('THIS WAS COPIED'));
        currentSS.moveActiveSheet(4);
        currentSS.deleteSheet(currentSS.getSheetByName('Artifacts and Evidence'));
        currentSS.getSheetByName('THIS WAS COPIED').setName('Artifacts and Evidence');
  
  
      }    
    };
  }
  </code></pre>