0

I have a ZIP file, and inside that zip file, there's multiple files with invalid file names (for my Debian OS): for example fileABC£ [abc123].txt

When I attempt to extract it unzip data.zip:

error:  cannot create data/subfolder/fileABC� [abc123].txt
        Invalid argument

How do I successfully unzip this file?

1
  • 1
    Rename it to something valid while it is still in the zip file and then extract it?
    – Mokubai
    May 17, 2019 at 16:52

1 Answer 1

1

I was able to fix the problem by using a python script:


#Python 2.x

import zipfile

print "[*] Beginning extraction process..."

zip = zipfile.ZipFile('data.zip')
for i, f in enumerate(zip.filelist):
  f.filename = 'extracted_{0:03}'.format(i)
  zip.extract(f)
  print "--- Extracted '%s'" % (f.filename)

print "[*] Done"

1
  • Any attempts using xarchiver didn't work, so I resorted to Python.
    – user96931
    May 17, 2019 at 17:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .