Can't download and delete in one connection - WeOnlyDo Discussion board

Can't download and delete in one connection (General questions)

by KenHarvey, Thursday, January 19, 2006, 00:26 (6883 days ago)

wod:

I am trying to download and delete using one connection. The DeleteFiles() results in a file or directory not found error, but more importantly it is not calling the LoopItemEvent.

I am calling the delete event from the DoneEvent of the download process.

Is it possible to rest the DoneEvent and LoopItemEvent from the download's done event:
sftp1.DoneEvent -= (sftp1_DoneEventDownload);
sftp1.LoopItemEvent -= (sftp1_LoopItemEventDownload);

and then change the events using:
sftp1.LoopItemEvent += new WeOnlyDo.Client.SFTP.LoopDelegate(this.sftp1_LoopItemEventDelete );
sftp1.DoneEvent += new WeOnlyDo.Client.SFTP.DoneDelegate(this.sftp1_DoneDeleteEvent);

I am not resetting sftp1 in any of the steps.

I've seen the code for deleting one file at a time, but like the loop and done approach.

Just can't get part 2 (the delete process to fire.)

Thanks,
Ken


Complete thread: