Post a reply

Options
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)

Options

Topic review

plh

Perfect - Thank you!

SynchronizationResult is exactly what I needed (and hadn't found).

Seems to work like a charm with the testing I've done so far.

/plh
martin

Re: Synchronize-question regarding odd setup

Use a method Session.SynchronizeDirectories from WinSCP .NET assembly.
https://winscp.net/eng/docs/library_session_synchronizedirectories

Do a regular synchronization against the "Archive" folder.

The method returns SynchronizationResult class that contains a list of downloaded (synchronized) files.
https://winscp.net/eng/docs/library_synchronizationresult

Iterate the list and move the downloaded files to "Download" folder.

See also:
https://winscp.net/eng/docs/library_ssis
plh

Synchronize-question regarding odd setup

Hi,

I have a somewhat odd need, that I'm not sure is supported - I hope you can tell me if it is:

I need to do a syncronize from ftp to local via a C# script. I have 2 local folders: Download and Archive. I want to look at contents of Archive to determine which files are downloaded from the ftp, but I want to place the files in the Download-folder. A regular Synchronize would obviously look at contents of Archive and update it with new files - this is not what I need.

I'm running some SSIS packages which move files from Download to Archive when they are loaded, and I don't want to re-download them afterwards. Due to a very large amount of files, I don't want to keep all the files in the Download-folder either, since I'm looping through files located in this folder in various SSIS-packages.

Is the above setup possible through some sneaky FileMask or some other method?

Thanks for any input!

/plh