Post a reply

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)


Topic review


Update: I was being silly and had an old version of the DLL, this script does work, flawlessly. Thanks for everything you do!

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:

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..


Looking for changes...

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:

It's defining it in the script:
$session = New-Object WinSCP.Session

What am I missing here? Some insight would help! Thanks!