download complete

  • Thread starter Thread starter Paul Cowan
  • Start date Start date
P

Paul Cowan

Hi all,

I am in a bit of a quandry. We have a change to make to an existing
windows service which polls a folder at configurable times and if a
certain file is found, it is ftp'd to a remote directory.

We have a new requirement where by we are now downloading large files
to UNIX. We have to provide a locking mechanism whereby we place what
is called a lock file on the remote directory and only remove it when
the proper file has completely been downloaded.

My question is (and I am no expert on ftp), is how do I know when the
file has been completely transferred onto the UNIX box.

I have heard talk of CRC, but can find very little on google about
this.

Any help greatly appreciated

Paul
 
Paul,

I don't think that CRC is what you need to use. If you are FTPing the
file programatically, then the code will inform you when the file is
uploaded. For example, if you are performing an asynchronous operation,
then a callback will be called when the operation is complete. If you are
performing a synchronous operation, then the upload is complete when the
method you call to upload the file returns. After that, you can do what you
wish, deleting or removing the file.

Hope this helps.
 
Back
Top