Prompting for password

Advertisement

Chandru
Joined:
Posts:
1
Location:
India

Prompting for password

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

Reply with quote

Advertisement

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

Reply with quote

Advertisement

You can post new topics in this forum