Topic ""Error code: 2" in simple PUT"

Author Message
ILL
[View user's profile]

Joined: 2014-04-21
Posts: 5
Location: Spain
I am scripting this simple code

open test:password@194.224.XXX.YYY
put .\sincc.TXT
bye

But it doesn't work. Winscp says "Error code: 2"

"sincc.TXT" exists next to the winscp executable.

Why?

I will attach the log.

Thanks in advance. Sorry for my English.
test@194.224.XXX.YYY.log (8.2 KB) [Download]

Description: (none)

Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
A full error message is:

Quote:
Cannot create remote file '/sincc.TXT'. ("No such file or directory.
Error code: 2
Error message from server: No such file."


The error comes from the server. It can have many reasons.

Were you able to upload any file using GUI?
_________________
Martin Prikryl
Guest




Thanks for the reply

I was not able to upload any file using Winscp GUI (see attached), but I was able to upload any file using another GUI (like coreFTP)



prikryl wrote:
A full error message is:

Quote:
Cannot create remote file '/sincc.TXT'. ("No such file or directory.
Error code: 2
Error message from server: No such file."


The error comes from the server. It can have many reasons.

Were you able to upload any file using GUI?
Subida a SFTP.JPG (139.1 KB) [Download]

Description: (none)

ILL
[View user's profile]

Joined: 2014-04-21
Posts: 5
Location: Spain
Sorry, prikryl. I was ILL, not guest.

prikryl wrote:
A full error message is:

Quote:
Cannot create remote file '/sincc.TXT'. ("No such file or directory.
Error code: 2
Error message from server: No such file."


The error comes from the server. It can have many reasons.

Were you able to upload any file using GUI?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
Please attach a log file from coreFTP.
_________________
Martin Prikryl
ILL
[View user's profile]

Joined: 2014-04-21
Posts: 5
Location: Spain
Attached. (private. There is no problem, is it?)

prikryl wrote:
Please attach a log file from coreFTP.
COREFTP.LOG (638 Bytes) Private file

Description: (none)

ILL
[View user's profile]

Joined: 2014-04-21
Posts: 5
Location: Spain
Oh! The message "Error code 2 no such file" which is true but because I'm uploading, gave me a reason to prove one thing: if the file exists in the destination, it works the upload! However, this is just a patch, because it is normal that the file upload is not there, of course.

prikryl wrote:
Please attach a log file from coreFTP.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
Thanks for the log.

Please attach WinSCP session log on Debug 2 level.
https://winscp.net/eng/docs/ui_pref_logging

Next, please try to set Preferred SFTP protocol version to 3.
https://winscp.net/eng/docs/ui_login_sftp
And attach a Debug 2 level log for that too.
ILL
[View user's profile]

Joined: 2014-04-21
Posts: 5
Location: Spain
Thanks for the reply again.

Already solved the incidence posted. It seemed to be something on the server and, as I think you were suspecting now, seemed to be some about versions, because we resolved with an update to the sftp server.

Greetings.

Sorry for my English.


prikryl wrote:
Thanks for the log.

Please attach WinSCP session log on Debug 2 level.
https://winscp.net/eng/docs/ui_pref_logging

Next, please try to set Preferred SFTP protocol version to 3.
https://winscp.net/eng/docs/ui_login_sftp
And attach a Debug 2 level log for that too.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24996
Location: Prague, Czechia
Thanks for sharing your solution.
_________________
Martin Prikryl
Prasenjit

Guest


Can you explain why is the file transfer being attempted the second time when its successful in the first attempt? Please find the log attached. As per transfer script logic the file is removed after the first successful transfer hence the second attempt is unsuccessful as the file is not available
bnp_put_FTPPWP4000030821.xml_12_01_2016_08_01AM.log (13.73 KB) [Download]

Description: (none)

Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License