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


Re: Call WinSCP Saved Session

Yes, see:

Though, it's not recommended to rely on GUI configuration:

You can have WinSCP GUI generate a full script for you:

Though in PowerShell, it's better to use WinSCP .NET assembly:

Call WinSCP Saved Session

Is there a way to call the WinScP saved session and not have WinSCP launch in the foreground. I have a Powershell script that currently makes a SFTP call to a site; however, I'm needing to use a proxy now. So, I thought that the easiest way would be to create a session in WinSCP then call that saved session from my script. My call line is a
Start-Process -FilePath "C:\Program Files...\..\WinSCP.exe" -ArgumentList "SiteName" -Wait -NoWindow
What this does is launch the WinSCP gui, logged me into the site, and then stopped. Is there a command switch to run a batch file? My previous process was running psftp and I had the command line arguments for the batch file. Can WinSCp take parameters to run a batch file?