You can use command "call" with proper remote-side command.
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
Well as you do not have a password in the script, it needs to prompt for a 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