Keep local directory up to date - CompareDirectories Method

Advertisement

SyncHelp
Joined:
Posts:
2
Location:
Canada

Keep local directory up to date - CompareDirectories Method

Hi All,

I'm trying to sync a remote directory to a local Windows server, I was testing the Session.SynchronizeDirectories Method and the code provided worked great after a bit of trial and error!

Today I came across this article:
https://winscp.net/eng/docs/library_example_keep_local_directory_up_to_date

This is exactly what I'm looking for! So I downloaded it, and tried to run it, I didn't change anything in the script and just passed the arguments it showed in the example. After some trial and error around the fingerprint I got passed that error and now..

Connecting...
Looking for changes...

Disconnecting...
Method invocation failed because [WinSCP.Session] does not contain a method named 'CompareDirectories'.
Is there a pre-req to this script that I'm missing? Is it no longer valid? was the method changed?

It sure looks like it's still there:
https://winscp.net/eng/docs/library_session_comparedirectories

It's defining it in the script:
$session = New-Object WinSCP.Session
What am I missing here? Some insight would help! Thanks!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum