Posted: 2008-03-31 20:39
Can anybody pls give me a VBScript to connect to FTP Server and download files using WinSCP3. I need this whole process to be auomatic without any manual intervention. I tried using the following given on the Website. I wrote this to a text file example.txt
# 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:email@example.com
# Change remote directory
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get examplefile.txt d:\
# Exit WinSCP
Thereafter on the Command prompt i called it using:
winscp3.exe /console /script=example.txt firstname.lastname@example.org
This opens the Winscp GUI Console. But i need to connect to the FTP Server and download the file silently instead of calling the GUI and needing to enter the login details. I need the whole thing to run from VBScript without any manual intervention and get the file to local machine. Is there a different way to do this from command line on Windows or do we need some other setup. I am completely new to this and vbscript. PLas help me out.
Location: Prague, Czechia
First, the "open email@example.com" and "firstname.lastname@example.org" on command-line does the same thing. Hence you end up with two connections opened.
If I understand you correctly your only concern is that there is a console window opened while the script is running. To avoid that, just omit the /console command-line parameter.
You can post new topics in this forum
And it's free!