Dec-01-2020, 07:28 AM
to bowlofred:
Thanks man!
I actually come up with my own solution.
It is not as short as yours...
Thanks man!
I actually come up with my own solution.
It is not as short as yours...
zout= 'C:\\0001\\' for fname in glob.glob('C:\\02\\*[0-9].*'): basename = os.path.basename(fname) just_n = os.path.splitext(basename)[0] fz = zout+just_n+'.zip' with ZipFile(fz,'w') as zip: zip.write(fname,arcname=basename) print (zip)I really appreciate your help!