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


Powershell script to ftp folder


I just installed winscp, and tried the following ftp script.
Add-Type -Path "C:\program files\ (x86)\winscp\WinSCPnet.dll"
$sessionOptions = New-Object WinSCP.SessionOptions
$session = New-Object WinSCP.Session
$session.PutFiles("E:\website\*", "/site/root").Check()

Which copies the folder and subfolders over. But is there a way to display the files that are copied in the powershell command, so I can see at what file he is copying. (so I can see the progress in the powershell window?)

Does this script list failures, if it somehow cant copy a filer/folder? Or list success or fail at the end?