Topic "Prompting for password"

Author Message
Chandru
[View user's profile]

Joined: 2007-07-27
Posts: 1
Location: India
Hi,

When i use the script below it is prompting for the password.

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open user@example.com
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get examplefile.txt d:\
# Disconnect
close
# Connect as a different user
open user2@example.com
# Change the remote directory
cd /home/user2
# Upload the file to current working directory
put d:\examplefile.txt
# Disconnect
close
# Exit WinSCP
exit

From my understanding it should login into the server and get the file.

regards
Chandru
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Well as you do not have a password in the script, it needs to prompt for a password.
_________________
Martin Prikryl
Guest




Hi Prikryl,

Thanks!

I would like to know when using WINSCP i login to a server and I would like to list all the folders to a text file and get the file to the local machine from where the script is run

Can this be done?

thanks
Chandru
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
You can use command "call" with proper remote-side command.
_________________
Martin Prikryl
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