How to retrieve the list of the files, that have to be updated during the synchonization.

Advertisement

dschawid
Joined:
Posts:
1
Location:
Baku

How to retrieve the list of the files, that have to be updated during the synchonization.

Hello.

I am currently try to automatize the process of updating the files on FTP server. I have written a script, that syncs the local folder with the folder on server which has ~8.000 files in it.

My problem is that, due to structure of the machines using the files on FTP server, I have to have ~20 folders with the same content in it (the content is the same folder with ~8.000 files in it, ~160 MB) and my script only syncs 1 folder at a time. A possible solution is to run the same app (I am deploying it as a web application with ASP.NET) 20 times, each time synchronizing the required folder, but I thought I could save the list of files that have to be updated and on the next iterations of the process upload only those files, avoiding the compare stage of files (at one release ~100 files are updated, so I don't have to compare all 8.000 files again).
In the image below "dir" is the folder that is being updated and have to be uploaded/synchronized to/with the FTP.

So I would like to know is there any method to retrieve the list of files to be updated?
(I am using the .NET Assembly and SynchronizeDirectories method on session object for synchronizing).

Blank diagram.png

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: How to retrieve the list of the files, that have to be updated during the synchonization.

I'm not sure I understand your question. But maybe you are looking for Session.CompareDirectories:
https://winscp.net/eng/docs/library_session_comparedirectories

Or, if you are looking for a list of files that were synchronized by the Session.SynchronizeDirectories, check SynchronizationResult that it returns:

Reply with quote

Advertisement

You can post new topics in this forum