i wanna check a zip file in a directory.how can do it?
directory="c:\myzipfiles"
listfiles="a.zip,b.zip,c.txt,d.xls"
#a.zip is badfile
import os
import zipfile
mylist=os.listdir("c:\myzipfiles")
for zfile in mylist
if zipfile.ZipFile.test(zfile):
print"you can extract ",zfile
else:
print "you cant extract ",zfile
and how can i use zipfile.ZipFile.testzip()
thanks for answers...