I am trying to unzip the file located in my ftp server and download in a fly.
ftp=ftplib.FTP('myftplink')
ftp.login('username','password')
for filename in files_list:
os.chdir(dir)
local_file=os.path.join(os.getcwd(),filename)
ftp.retrbinary('RETR %s'%filename,open(filename,'wb').write)
with zipfile.ZipFile(filename,'r') as z:
z.extractall()
With this I could download the zip file and unzip it into the folder but is there a way to unzip and download only the unzipped file rather than download zip file.