Link to home
Start Free TrialLog in
Avatar of dynamicweb09
dynamicweb09Flag for India

asked on

How to Get Latest file from FTP server

I Have a console application. From that application I want a latest file from FTP server. I have a ftp connection, there are several files with unique name . How can I get the latest file from that server by console application .Net C#
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You can't because there aren't any FTP commands that will sort a directory listing.  The FTP programs that I use like CoreFTP and Filezilla get the directory listing and sort it themselves.  You will have to do the same.
Avatar of dynamicweb09

ASKER

Is there any other way to do this
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gautham Janardhan
Gautham Janardhan

you can issue the command ListDirectoryDetails will give u the date created not sure if it gives u modified date take a look at this

http://social.msdn.microsoft.com/Forums/vstudio/en-US/7758e7a8-e063-4eec-a6c1-c76a59d02852/listing-all-files-from-ftp-server-using-c?forum=csharpgeneral