I am getting the following error:

Reading Remote Directory: Error changing directory to '/script=E:\Data\GmousCR12\bin\Get.sftp'
Cannot get real path for '/script=E:\Data\GmousCR12\bin\Get.sftp'
No such file or directory.
Error code 2
Error message from Server: No Such file
Request code: 16
Session started.
Active Session: [1] username@ipaddress

The file exist on another E drive of the same server.

  • Is the path correct? I can see /script= there, which does not seem correctly – burtek Feb 8 '13 at 16:26
  • Maybe it wants /script="E:\DataGmousCR12\bin\Get.sftp" – slm Feb 8 '13 at 16:41
  • Thanks. I have now tested using /script="E:\DataGmousCR12\bin\Get.sftp" but still having the same error. I have also tried looking for an explanation of the error code "2" and request code "16" but can't seem to find these in the winSCP manual. Thanks for your help in advance. – user196513 Feb 10 '13 at 11:48

I removed


from winscp.ini and error code 2 "can't change directory is gone".

Would help, if you share your script.

But you have definitely a syntax error, when starting WinSCP or in your script.

/script=E:\Data\GmousCR12\bin\Get.sftp is command-line argument to refer to the script to execute. It's not clear from your post from where this "string" comes

  1. If it's on command line, chances are that you have omitted space between session URL or stored session name and the /script parameter, like:

    winscp.com mysession/script=E:\Data\GmousCR12\bin\Get.sftp

    Make sure you add a space to separate these.

  2. You may as well have the /script= somewhere in the actual script file. But I find that unlikely. Just in case, remove it, as it does not belong there.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.