Windows – WinSCP error setting up directory


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.

Best Answer

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: 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.