Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UploadDirectory with FtpFolderSyncMode.Update reads all the remote folders and files #616

Closed
martoiu opened this issue Sep 8, 2020 · 5 comments

Comments

@martoiu
Copy link

martoiu commented Sep 8, 2020

FTP OS: Windows

FTP Server: Dont know

Computer OS: Windows

FluentFTP Version: 32.4.4

The remote folder contains a very large number of folders and files. The local folder only three small files. But uploading takes forever.

In the output window in Visual studio I see alle the remote folders and remote files passing by. I assume that the directory upload should look at the local folder, walk the subfolders and the files and check wether they exist on the remote folder. Thus it is not necessary to walk all the remote folders.

Excuse if I assume something wrong, I am a newbie in C# and FTP.

Here is my code:

	public static void UploadDirectory(string HostName, int port, string UserName, string Password, string LocalPath, string RemotePath, string LogPath )
	{
		using (var ftp = new FtpClient(HostName,UserName , Password))
		{
			try
			{
				ftp.Connect();
			}
			catch (Exception e)
			{
                System.Windows.Forms.MessageBox.Show($"Cannot connect. Error {e.Message}");
				return;
            }

			// upload a folder and all its files
			List<FtpResult> f = ftp.UploadDirectory(LocalPath, RemotePath, FtpFolderSyncMode.Update);
			ftp.Disconnect();
		}
	}

Logs : Do I need to upload the logs?


<paste logs here>

@robinrodricks
Copy link
Owner

Currently we support 2 modes, update and mirror. In any mode, the remote directory is fully listed, then compared, then the actually upload begins. This is done in order to skip files that are already uploaded. We can support a third mode, maybe like BlindTransfer which will not list the remote directory.

@martoiu
Copy link
Author

martoiu commented Sep 8, 2020

Please do something about it. I have tried the example from WinSCP, which synchronizes two folders, and it uploaded in miliseconds. FluentFTP was still bussy after 15 minutes when I broke the operation. I would rather use FluentFTP than WinSCP, but without the promised enhancement I cannot use it.

@Sonic3R
Copy link

Sonic3R commented Nov 20, 2020

@robinrodricks : would be nice that feature, I encounter same issue as @martoiu

@robinrodricks
Copy link
Owner

Added to the bucket list. We will pick this up as and when we have free time. Comment on this issue if you want us to prioritize it. Thanks!

@robinrodricks robinrodricks closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2022
@dlambert-personal
Copy link

FWIW, I'm stuck on the same issue -- I've got a remote server with a ton of files, and my updates are timing out. I turned on logging (worked great, btw), and was able to see the better part of a million lines of logs - almost all of which were getting remote directory listings. This is going to be a showstopper for me. Is this feature still considered not planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants