function fileExists_(fileName, objFolder) {

  let files = objFolder.getFilesByName(fileName);

  while (files.hasNext()) {
    let file = files.next();
    console.log(`${file.getName()} already exists.`)
    return true;
  }
  return false;
}
Tests if a file exists within a given folder.

@param {string} fileName - Name of the file to test for.
@param {object} objFolder - Folder object in which to search.
@return {boolean} true if found in folder, false if not.