Category Archives: ftp

Get file size and last modification time on an FTP server in C#

The FtpGetFileSize method shown in the following code gets a file’s size in bytes. The uri parameter gives the full path to the file as in ftp://www.somewhere.com/test.txt. Note that the URI must begin with ftp not http. // Use FTP … Continue reading

Posted in files, ftp, internet, web | Tagged , , , , , , , , , , , , , , | Leave a comment

Upload files to an FTP server in C#

The following FtpUploadFile method uploads a file to an FTP server. The to_uri parameter is a URI (Uniform Resource Identifier) that identifies the target file as in ftp://www.somewhere.com/test.txt. The other parameters are self-explanatory. // Use FTP to upload a file. … Continue reading

Posted in files, ftp, internet, web | Tagged , , , , , , , , , , , , , | Leave a comment

Upload text into a file on an FTP server in C#

The following FtpUploadString method uploads a text string into a file on an FTP server. The to_uri parameter is a URI (Uniform Resource Identifier) that identifies the target file as in ftp://www.somewhere.com/test.txt. The other parameters are self-explanatory. // Use FTP … Continue reading

Posted in files, ftp, internet, web | Tagged , , , , , , , , , , , , , | Leave a comment