Open session with site name in PowerShell script

Advertisement

paulbratcher@wireco.com
Joined:
Posts:
1
Location:
KS

Open session with site name in PowerShell script

I am a bit new to WinSCP. I am trying to automate and write a PowerShell script to open an SFTP site. I have saved the site info in the Site Manager and I am trying to open that session in my script with the open command. For some reason when the script is run it will not find the site that is specified. for example:
# Needed for PowerShell 7.3 and newer
$PSNativeCommandArgumentPassing = "Legacy"
 
& "C:\Program Files (x86)\WinSCP\WinSCP.com" `
  /log="E:\ChromeRiver\LOGS\WinSCP.log" /ini=nul `
  /command `
    "open  ChromeRiverEU" `
    "cd /files/export" `
    "lcd E:\ChromeRiver" `
    "get LNBR-OOP-PROD-YEWD*.xls" `  
    "exit"[/color]
any advice would be great.. Thanks

Reply with quote E-mail

Advertisement

Advertisement

You can post new topics in this forum