def GetFileBaseName(filename):
  """Removes all extensions from a file.

  (Note: os.path.splitext() only removes the last extension).
  """
  first_ext = filename.find('.')
  if first_ext != -1:
    filename = filename[:first_ext]
  return filename