Delete files on FTP server using date

+1 vote

Can you advise how to delete files on the FTP site older than a week?
I can see how to delete but not control the age?
I am using VB.net

asked Oct 10, 2017 by Gavin

1 Answer

0 votes
 
Best answer

Try using Ftp.GetList() method. It returns List of FtpItems, each file should have FtpItem.ModifyDate property filled

If you are controlling how your files are named, you may consider using date/time in their names e.g. 20171010235959Members.csv

That marks the file explicitly with certain date and makes many things much easier.

answered Oct 10, 2017 by Limilabs support (237,290 points)
...