TWebCopy

I am having trouble with FTPDelete using WebCopy 2.4.0.1.  I as able to download multiple files and now I want to delete them, one at a time.


   webcopy1.Items.Clear;
    webcopy1.DlgCaption := 'Deleting downloaded file...';
   with webcopy1.Items.Add do
      begin
         FTPHost := sHost;
         FTPuserID := sUser;
         FTPpassword := sPassword;
         Protocol := wpFTPDelete;
         TargetDir := sFTPDir;
         URL := sFileName;
      end;
   Webcopy1.Execute;

I do not get any error messages, but the file does not delete.  I can sign into the same FTP site with WS_FTP Pro and delete the files manually without a hitch.  

BTW:
sFTPDir := 'OrderExport';
sFileName := 'OrderDetail.txt';

Any idea what is wrong?
Thanks,
Marshall



  1. Is WebCopy.OnRemovedFile triggered for each of these files?
    2) Is WebCopy.OnRemoveFileFailed triggered?
    3) Did you check WebCopy.Items[index].Success after execution?
  1. No. It is not triggered.
    2. No. It is not triggered.
    3. No.

    Marshall

Do you have another FTP server to test with (maybe this is a permission issue) , as I cannot reproduce such problem here.

No, I don't.  As I said before I can delete the file without a problem using WS-FTP Pro, so it doesn't seem to be a permission problem.


Marshall

Then provide us access so we can test it from here.

I solved the problem by creating a Webcopy2 and using that for the delete.  I don't understand why.  Webcopy1 had already completed, I think.


Marshall