Topic "Preview results while using synchronize"

Author Message
jrp78
[View user's profile]

Joined: 2016-10-07
Posts: 18
Location: SoVA
Is it possible to have the log write the output of the -preview switch while actually synchronizing?

I'm currently running my script twice. First pass, it uses -preview so I have a log of the "Differences Found:". I really wish I could run my actual sync and have this nice neat list of the differences found all in one pass.
martin◆
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
You can use .NET assembly and generate the list based on results of Session.SynchronizeDirecotries:
https://winscp.net/eng/docs/library_session_synchronizedirectories
https://winscp.net/eng/docs/library_synchronizationresult
jrp78
[View user's profile]

Joined: 2016-10-07
Posts: 18
Location: SoVA
Thanks. Unfortunately, I don't know how to write .NET. I did find a workaround for now. I run the preview every time but then before the second run without -preview, I do a FINDSTR in the log and if it finds the phrase "Nothing to synchronize" then the script exits at that point. If it doesn't find this string, it proceeds to run the script again without -preview.
Advertisements

You can post new topics in this forum

Search

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License