Topic "Stop transfer in FileTransferProgress Event"

Author Message
bpacilio59
[View user's profile]

Joined: 2016-07-05
Posts: 4
I sometimes have large downloads or uploads that may need to be interrupted. Can I stop the transfer from withing the FileTransferProgress event ? I don't want to end the session, I just want to stop the current tranfer
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
No, this is not supported. Ending session is the only way.
bpacilio59
[View user's profile]

Joined: 2016-07-05
Posts: 4
Given this is the only way, I would be ending the session from the FileTransferProgess Event. Would I be better off using the session->close or the session->abort ?

martin wrote:
No, this is not supported. Ending session is the only way.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
Use the Abort. The Close won't work.
Barlo
[View user's profile]

Joined: 2012-09-03
Posts: 9
Hi,
I'm using session.SynchronizeDirectories, but sometimes is needed stop the transfer. The issue is that I dont't know how to use session.abort. I have added a new button to the form to implement the stop funcionality.
Could you please write an example of this?

Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
Sorry, but we are not a code writing service here.
Barlo
[View user's profile]

Joined: 2012-09-03
Posts: 9
Thank you Martin,
In that case, could you please, give me some idea, using words, about how to use session.abort in the middle of a transfer so it takes effect?

Thank you in advance.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25019
Location: Prague, Czechia
I do not understand the question. Just call it. From another thread. Or from some event handler.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License