I'm trying to navigate to the latest directory on an FTP site to download a CSV file in it. For this example, I'm trying to select the OG_EWA_2018-06-02
link. How can I access using the max date? Thanks
OG_EWA_2018-03-02 . . . Mar 02 10:52
OG_EWA_2018-04-03 . . . Apr 03 09:20
OG_EWA_2018-05-02 . . . May 02 09:17
OG_EWA_2018-06-02 . . . Jun 02 10:52
from ftplib import FTP
ftp = FTP('ftp')
ftp.cwd('OG_EWA')
ftp.retrlines('LIST')
print(ftp)