Invalid file name inside zip file

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 Answer

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like