I am getting the following error when unzipping a file
unzip user_file_batch1.csv.zip
Archive: user_file_batch1.csv
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of user_file_batch1.csv or
user_file_batch1.csv.zip, and cannot find user_file_batch1.csv.ZIP, period.
I believe this file is not corrupted or a part of multi archive file as using Archive Utility I was able to unzip it.
I have tried to rename it to .zip
but did not work.
The output of type file user_file_batch1.csv.zip
was
user_file_batch1.csv.zip: uuencoded or xxencoded text
Best Answer
Your file has a
.zip
name, but is not in zip format. Renaming a file doesn't change its content, and in particular doesn't magically transform it into a different format.(Alternatively, the same error could happen with an incomplete zip file — but since that Archive Utility worked, this isn't the case.)
Run
file user_file_batch1.csv.zip
to see what type of file this is. It's presumably some other type of archive that Archive Utility understands.Run the following command:
This creates a file whose name is indicated in
user_file_batch1.csv.zip
. If you want to pick a different output file name:The output file at this stage may, itself, be an archive. (Perhaps it's a zip, in fact.) Run the
file
utility again on this file to see what it is. If you choose the automatic file name, it might give a clue.