FTP GetFile Method

0 votes
asked Aug 16, 2012 by DOR_TMART (120 points)
edited Aug 16, 2012

Why would the FTP GetFile Method produce a zero byte file?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered Aug 16, 2012 by Tomas Knopp (58,890 points)
edited Aug 16, 2012

For instance, a zero-byte file will be produced if the remote file you are downloading has length = 0. You can check the length of the remote file before downloading using GetFileLength method like this:

ftp.GetFileLength("filePath")

...