Dec-01-2020, 05:05 AM
Thanks bowlofred!
I tried your suggestions.
Still the script only copies files not zipps then up.
I actually tried to open one of the copied files, they all have extensions '.TXT' but it is not a'.TXT' file. I cannot really open it up. SO the script does something to the files.
here is a new version of the script:
I tried your suggestions.
Still the script only copies files not zipps then up.
I actually tried to open one of the copied files, they all have extensions '.TXT' but it is not a'.TXT' file. I cannot really open it up. SO the script does something to the files.
here is a new version of the script:
from zipfile import ZipFile import os import glob import os.path zout= 'C:\\0001\\' for fname in glob.glob('C:\\02\\*[0-9].*'): print (fname) basename = os.path.basename(fname) fz = zout+basename print (fz) with ZipFile(fz,'w') as zip: zip.write(fname)