title: How to pass parameters in PowerShell script which executes in WinSCP command?
body: <p>I have a PowerShell script </p>
  
  <pre><code>cd "C:\Program Files (x86)\WinSCP"
  . .\WinSCP.exe /console /script="L:\Work\SAS Data\FTP\local2remote.txt"  /log=log.txt
  </code></pre>
  
  <p>It calls WinSCP command file</p>
  
  <pre><code>option batch on
  open ftp://user:pass@host -passive=on
  lcd "J:\Work\SAS Data\Roman\Lists"
  put target.csv
  exit
  </code></pre>
  
  <p>I want to convert "J:\Work\SAS Data\Roman\Lists" to a parameter in the PowerShell script where the parameter can be passed in the txt file. Same goes for the file target.csv. Any help appreciated. </p>