I\'m using following code where I pass .pdf file names with their paths to create zip file.
for f in lstFileNames: with zipfile.ZipFile(\'reportDir\' + s
Order is incorrect. You are creating new zipfile object for each item in lstFileNames
lstFileNames
Should be like this.
with zipfile.ZipFile('reportDir' + str(uuid.uuid4()) + '.zip', 'w') as myzip: for f in lstFileNames: myzip.write(f)