title: FTP transfer with WinSCP - Getting "Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead."
body: <p>I use this code to <strong>copy</strong> files from the server <strong>to a local</strong> folder</p>
  
  <pre><code>option batch abort
  option confirm off
  open ftp://Emna:root@localhost
  synchronize local C:\Users\User\Documents /Projets/SPR/Sources
  exit
  </code></pre>
  
  <p>I run the script using this command:</p>
  
  <pre><code>winscp.com /RemoteScript.txt
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>I'm getting this error:</p>
  
  <blockquote>
    <p>Opening session using command-line parameter in scripting is deprecated. Use 'open' command instead.</p>
  </blockquote>
  
  <p>What can I do to copy files from the server to a local folder using a script?</p>