Topic "WinSCP executing script from command line"

Author Message
Leo
[View user's profile]

Joined: 2006-10-02
Posts: 4
Location: Toronto
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)
Advertisements
Guest




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)
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
The script is ok. Are you able to login from GUI with the same username/password as you use in the script?
_________________
Martin Prikryl
otaraka

Guest


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
otaraka

Guest


Hi Prikryl,

Sorry for posting in a hurry.

I gave wrong user id. Now it is working.

Regards,
Srini
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