Topic "output from eventhandler"

Author Message
lduczmal
[View user's profile]

Joined: 2013-01-30
Posts: 7
Hi,
I'm trying to modify example of event "FileTransfered" handler published as part of Session.SynchronizeDirectories Method powershell example. This handler use write-host cmdlet to display messages produced by the eventhandler. It works fine, but I need output from the handler futher in my main script so I need put this output to variable seen in main script. I tried to use "$script:variable" but it doesn't work: in eventhandler script block correct value is seen, but in main script it is empty. I can create temporary file from eventhandler, put there output message and finally read this file from main script but is isn't good solution.
Please help
Łukasz Duczmal
Advertisements

You can post new topics in this forum






Search Site

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