Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4k views
in .NET FTP by (520 points)
I'm a little confused about how file syncing is suppose to work. I have a large set of files but I only want the files that have changed to sync. When I attempt to sync, all files are being synced. I can understand this for the first sync, but I checked the dates of the remote server and they changed to the date and time of the sync. So, the next time I run the sync, all the files sync again. How do I sync only files that have changed? Ignoring dates won't work because it is possible to make a change to a file and the size of the file remain the same.

I've tried using Syncronize_File event but I don't see how that is going to work either. I guess I did think of a way to use this event but it would greatly increase the amount of time to perform the sync.

What is you recommended way to sync only files that have changed?

3 Answers

0 votes
by (520 points)
I decided to try to use SynchronizingFile Event event. I guess I need more explanation of how sync rules work and FTPSyncFileEventArgs work.

My local folder had 5222 files and the remote server had 4000. Most of the files on the server were on the local machine as well. I set the Direction to UPLOAD because I do not want bi-directional. When the sync was over, I had 1600 files on the remote server and 5222 files on the local machine. Not exactly what I call syncing.

I ran syncing without using SynchronizingFile Event and all the files on the remote server were back. I could do this with a regular upload command. I need to sync.

I have a very important project due soon and was hoping to use edtFTP to solve certain problems. Please let me know ASAP how to sync files.
0 votes
by (520 points)
I just noticed the help says:

Synchronizes LocalDirectory (only in edtFTPnet/PRO) on the local machine with ServerDirectory (only in edtFTPnet/PRO) according to the synchronization rules in DefaultSyncRules.

However, the feature matrix on the web site says edtFTPnet Express can also sync. What's up?
0 votes
by (162k points)
It's a documentation error - both edtFTPnet/Express and edtFTPnet/PRO support syncing.

What criteria do you want to use for synch'ing, i.e. in your situation is it the same timestamp that indicates the files are identical?

Categories

...