APPE

Hello,

I am evaluating the SmartFTP Library and so far I am impressed. I am trying to upload and append a file using the APPE command. So far I have not found the proper calls.

Please let me know how to accomplish this.

Thank you,

Balch

26 views and no reply?

Please let me know if I am missing something obvious.

Thank you,

Balch

APPE is currently not implemented because I've not encountered any situation so far where it would be better to use APPE instead of REST.

Why do you want to use the APPE command?

-Mat
SmartFTP

Thank you for responding.

We have an application that consumes files off an FTP server for to sync with our database. Our client application appends new data to files already present on the FTP server. We want to update our functionality to use Secure FTP. We are currently evaluating several FTP libraries and I like what I see with SmartFTP, except that fact the I cannot use APPE which our current implementation uses.

Please let me know if there is a way to accomplish this with the REST command.

Thank you,

Jay Balcher

Hello ..

SIZE is the more reliable way to resume a transfer. Why? Because you can exactly specify the position where data gets appended to the existing file on the server (in case you are uploading).

APPE just starts appending everything at the end of the existing file. If this is what you intend to do, you can achieve the same result a REST, STOR combination:

REST <file size of existing file>
STOR <file>
is semantically equal to:
APPE <file>

In both cases you need to get the <file size of existing file> by either sending a SIZE <file> command or by extracting the file size from the directory listing.

If you are using the UploadFile(local file, remote file, startpos) or DownloadFile(local file, remote file, startpos) functions provided by the SmartFTP FTP Library, REST is automatically sent if the startpos is greater than 0.

Regards,
-Mat