Transfer Multiple files at the same time.

0 votes
asked Sep 21, 2016 by ksc4042 (130 points)


I want transfer multiple files at the same time using single "Rebex.Net.FileTransferClient" class.

For example, now File1 -(File Transfer Complete)-> File2....

File1 --
|--(Transfer at the same time)--> Transfer Complete.
File2 --

Thank you.

Applies to: Rebex FTP/SSL, Rebex SFTP

1 Answer

+1 vote
answered Sep 21, 2016 by Tomas Knopp (58,890 points)


we do not have a simple API for this task.

You could write your own FileTransferClientParallel class that would internally hold more connected instances of our FileTransferClient class. Your class would need a queue of files waiting to be transferred and it would distribute the work within 1,..,n FileTransferClients. Every time a client would finish one transfer it would be assigned another transfer. The parallel class would technically allow maximum n parallel transfers to be performed simultaneously.

commented Jan 9 by hieulq (100 points)
Dear Tomas Knopp
Please, can you code demo FileTransferClientParallel class for me, I also want to upload multiple files at the same time using single "Rebex SFTP"
Thank you so much!
commented Jan 9 by Lukas Pokorny (112,430 points)
Rebex SFTP's Sftp object actually makes it possible to transfer multiple files at the same time using a single instance. Just call a method such as PutFile multiple times.