Wanted to extract .zip file one by one. Before extracting I need to rename
myzip = zipfile.ZipFile(source,'r')
for zib_e in myzip.namelist():
filename = os.path.basename(zib_e)
if not filename:
continue
print zib_e
myzip.extract(zib_e,"/tmp/")
myzip.close()
The above code extracts all file in /tmp/. But I wanted to rename each file and save in destination directory ie., /tmp/ without zipped structure