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

Stephane Tinseau

Hi,

It's my fault due to lot of updated files during synchronization.
There is no problem.

Thanks
Regards
martin

Re: Partial Synchronization

Sorry, it's not clear what the issue is. Can you try again? Is the problem, that you need to run the script multiple times to get the files in sync? Why? What's wrong after the first run?

Also make sure you attach a full log file showing the problem. And explain us, what we should look for in the log.
Stephane Tinseau

Partial Synchronization

Hi,

I have develop 2 scripts with WinSCP and powershell to synchronize 2 file servers,
The first to synchronize and the second to check.
Unfortunately, i need to run the first script several time to ensure all files are correctly replicated.

For Synchronization, i have mapped the share drive and Synchronize directories using the following options
session.timeout="1:0:0"

sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
sessionOptions.AddRawSettings("Utf","1")
transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
transferOptions.ResumeSupport.State = [WinSCP.TransferResumeSupportState]::Off

session.SynchronizeDirectories(
    [WinSCP.SynchronizationMode]::Remote,
    source,
    destination,
    True
    False
    [WinSCP.SynchronizationCriteria]::Eitherm
    transferOptions)


For checking, i have used ListDirectory on both file server with the following options and compare the results.
sessionOptions.Protocol = [WinSCP.Protocol]::Sftp

sessionOptions.AddRawSettings("Utf","1")
session.timeout="0:5:0"
session.ListDirectory(path)


The first script take around 30 mns but the second around 3 hours.

For both scripts, i used WinSCPnet 5.7.6.0 (1.2.10.5874) and WinSCP 5.7.6.0 (5.7.6.5874)

Could you please help me to solve this issue.

Thanks
Regards
Stephane