+2 votes

Hi Team,
I need some clarifications and how to implement using FTP?.

1) I would like to download the files to local sytem folders from specific FTP folder and should not be duplicated files( i.e means avoid the twice the same files downloading & need to verify with the datetime, don't want old files)

2) Once you downloaded the files as per the above rule 1, need to upload the files to other ftps server and delete the local files from respective folders in local system folders

Could you please clarify me on the above two items with the code using the FTP,

Thanks & Regards,
Mohan

by

1 Answer

0 votes

Use Ftp.Download method for downloading files.

You can use Ftp.GetList to list files on the server - depending on your server it should include last modification date (FtpItem.ModifyDate).

Use Ftp.Upload method to upload files from local machine to remote FTP server.

You can look at the Ftp.DownloadFiles and Ftp.UploadFiles methods for downloading and uploading entire folder structures.

by (301k points)
...