WinSCP executing script from command line

Advertisement

Leo
Joined:
Posts:
4
Location:
Toronto

WinSCP executing script from command line

Hi. I am trying to create a script to login and get a file using the command line tool. I don't think I am doing it right and what I see on WinSCP help is not helping much. Can someone paste a couple of lines of code to show me how this is done? No matter how I write the script, it's always asking me for username & password.

here's the last script:

option batch on
option confirm off
open user:password@express.com
option transfer binary
get testfile1.txt c:\Temp\
close

and the output:


batch on
confirm off
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Access denied.
Authentication failed.
Authentication log (see session log for details):
Using username "user".
Authenticating with pre-entered password.
Access denied.

Unable to authenticate
transfer binary
No session.
No session.


any ides?

Thanks for your help

(if I posted this twice, my apologies)

Reply with quote

Advertisement

Guest

Re: WinSCP executing script from command line

Does none know the answer to this question?
Can such thing be done?

Leo wrote:

Hi. I am trying to create a script to login and get a file using the command line tool. I don't think I am doing it right and what I see on WinSCP help is not helping much. Can someone paste a couple of lines of code to show me how this is done? No matter how I write the script, it's always asking me for username & password.

here's the last script:

option batch on
option confirm off
open user:password@express.com
option transfer binary
get testfile1.txt c:\Temp\
close

and the output:


batch on
confirm off
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Access denied.
Authentication failed.
Authentication log (see session log for details):
Using username "user".
Authenticating with pre-entered password.
Access denied.

Unable to authenticate
transfer binary
No session.
No session.


any ides?

Thanks for your help

(if I posted this twice, my apologies)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: WinSCP executing script from command line

The script is ok. Are you able to login from GUI with the same username/password as you use in the script?

Reply with quote

otaraka
Guest

In continuation to the question posted...

Hi Prikryl,

I have the same problem and to anwer your question, YES I am able to login with same user id and pwd usinng interactive command line and GUI. But when running through a batch file I am getting same error.

Can you please reply.

Cheers
Srini

Reply with quote

Advertisement

You can post new topics in this forum