WinSCP error setting up directory

1

1

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.

user196513

Posted 2013-02-08T16:17:38.633

Reputation: 11

Is the path correct? I can see /script= there, which does not seem correctly – burtek – 2013-02-08T16:26:31.720

Maybe it wants /script="E:\DataGmousCR12\bin\Get.sftp" – slm – 2013-02-08T16:41:19.317

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 – 2013-02-10T11:48:37.973

Answers

0

I removed

[Sessions\Default%20Settings]
.... 

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

Wasim A.

Posted 2013-02-08T16:17:38.633

Reputation: 299

0

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.

Martin Prikryl

Posted 2013-02-08T16:17:38.633

Reputation: 13 764