I am connecting to an SFTP folder with a list of files. I need to order these by date and extract the latest two.
filepath= "/test/sftp/files/"
localpath= "C:/myfiles/"
os.get(filepath, localpath)
I can extract all the files by using the os.get
but I tried os.listdir
but this does not order by date which I need. I looked in the os
library but can't find something to order by date.
I'm using Paramiko.