

def archive(self):
    '\n        Save a copy of the download zip file on RawDataVersion and a copy of\n        each .TSV file on the associated RawDataFile.\n        '
    if self.verbosity:
        self.log(' Archiving original files')
    self.version.zip_file_archive.delete()
    zipped_file = open(self.zip_path)
    self.version.zip_file_archive.save(self.url.split('/')[(- 1)], File(zipped_file))
    zipped_file.close()
    for raw_data_file in self.raw_data_files.filter(version=self.version):
        raw_data_file.download_file_archive.delete()
        with open(((self.tsv_dir + raw_data_file.file_name) + '.TSV')) as f:
            raw_data_file.download_file_archive.save((raw_data_file.file_name + '.TSV'), File(f))

dataset/ETHPy150Open california-civic-data-coalition/django-calaccess-raw-data/calaccess_raw/management/commands/downloadcalaccessrawdata.py Command.archive/original