Oct-28-2022, 04:16 AM
Hi Team,
I want to gzip all files of a folder \or complete folder. save with different name.
before deleting all files from a folder. how to achieve this.
with the below code I can gzip single file.
I want to gzip all files of a folder \or complete folder. save with different name.
before deleting all files from a folder. how to achieve this.
with the below code I can gzip single file.
import gzip import shutil fname = "D:\bigcsv.csv" with open(fname,'rb') as f_in: with gzip.open(f'{fname}.gz','wb') as f_out: ` print(“success”)