I've been working on this code somewhat succesfully, however I'm unable
to get it to iterate through all the zip files in the directory. As of
now it only extracts the first one it finds. If anyone could lend some
tips on how my iteration scheme should look, it would be hugely
appreciated. Here is what I have so far:

import zipfile, glob, os

from os.path import isfile
fname = filter(isfile, glob.glob('*.zip'))
for fname in fname:
    zf =zipfile.ZipFile (fname, 'r')
    for file in zf.namelist():
        newFile = open ( file, "wb")
        newFile.write (zf.read (file))
        newFile.close() 
    zf.close()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to