code: def process_file(filename: str,
                   filetypes: List[str],
                   move_to: str,
                   delete_if_not_specified_file_type: bool,
                   show_zip_output: bool) -> None:
      
      # log.critical("process_file: start")
      try:
          reader = CorruptedOpenXmlReader(filename,
                                          show_zip_output=show_zip_output)
          if reader.file_type in filetypes:
              log.info("Found {}: {}", reader.description, filename)
              if move_to:
                  dest_file = os.path.join(move_to, os.path.basename(filename))
                  _, ext = os.path.splitext(dest_file)
                  if ext != reader.suggested_extension():
                      dest_file += reader.suggested_extension()
                  reader.move_to(destination_filename=dest_file)
          else:
              log.info("Unrecognized or unwanted contents: " + filename)
              if delete_if_not_specified_file_type:
                  log.info("Deleting: " + filename)
                  os.remove(filename)
      except Exception as e:
          # Must explicitly catch and report errors, since otherwise they vanish
          # into the ether.
          log.critical("Uncaught error in subprocess: {!r}\n{}", e,
                       traceback.format_exc())
          raise
docs: Deals with an OpenXML, including if it is potentially corrupted.
  
      Args:
          filename: filename to process
          filetypes: list of filetypes that we care about, e.g.
              ``['docx', 'pptx', 'xlsx']``.
          move_to: move matching files to this directory
          delete_if_not_specified_file_type: if ``True``, and the file is **not**
              a type specified in ``filetypes``, then delete the file.
          show_zip_output: show the output from the external ``zip`` tool?