Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


Re: [SOLVED] Syncronize Vs GetFiles C#

With synchroniztion there's no way to calculate progress. WinSCP does not accounce how many files it's going to synchronize.

[SOLVED] Syncronize Vs GetFiles C#

To be honest, It is working kind well. I just don't know how can I (if I can) watch my download % for each file, and\or my % of files download.

In this second case I tryed:

int contador = 0;
label1.Text = "Listing";
foreach (RemoteFileInfo fileInfo in directory.Files)
progressBar1.Maximum = contador;

and in my FileTransferred Method

But it just work for the first Path (Of course, I couldnt retrieve my subfolders... since I start my session.SynchronizeDirectories, it freeze my code)

Could you help me with it?

[SOLVED] Syncronize Vs GetFiles C#

It was a stupid error in my path cSaida[0]. :roll:

cSaida[0] = "J:\Test\Files from Jan\Folder1"

and in Windows I had
"J:\Test\Files from Jan\"
Thank you!

Now I need to know how to capture these events by the "FileTransferred" as the link

Re: Syncronize Vs GetFiles C#

Than you for your help, but nothing happens... it still pass thru this line as if I dont have it

I also have my:
private static void FileTransferred(object sender, TransferEventArgs e)

And once again, my code never enter on it

Re: Syncronize Vs GetFiles C#

Should be:
synchronizationResult = session.SynchronizeDirectories(SynchronizationMode.Local, cSaida[0], cEntrada[0], false);

Syncronize Vs GetFiles C#