Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: VBScript to get file from FTP Server to Local Machine

First, the "open user@example.com" and "user@example.com" 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.
palakksa

VBScript to get file from FTP Server to Local Machine

Hello,
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: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
# Exit WinSCP
exit

Thereafter on the Command prompt i called it using:
winscp3.exe /console /script=example.txt user@example.com

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.