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?
11 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