Solved How to FTP the files through VB script?

June 25, 2013 at 02:57:38
Specs: Windows Server 2003
Hi,

Please help me in FTP through VB script.

It should connect to the server, change the path and upload the files from local path.

Similarly it should connect to the server, change the desired path and download the files to the local server,

Note : To connect to the server we will be having Userid and password.


See More: How to FTP the files through VB script?

Report •


#1
June 25, 2013 at 12:45:52
I would just shell out and use the FTP command:

WSH.RUN "FTP -I -N -S:ftpscript",int_wstyle,bool_tf

sample ftpscript:

OPEN myftpserver.net
USER my_id
password
CD files
MPUT *.tx
MGET *rx.
QUIT

You can use vbscript to build the ftpscript to perform any FTP options as needed. I don't think vbscript has a built-in ftp opject, although there may be ways to build one in, but why bother? just use FTP...
FTP -?
shows commandline optionts
FTP
ftp> ?
shows ftp commands available
ftp> ? CD
"details" a command (in this case, "CD")
ftp>QUIT


Report •

#2
June 26, 2013 at 05:58:15
✔ Best Answer
It's been suggested to use Shell.Application to access remote sites. I don't really have the time to test or implement a solution, though.

EDIT: Something like this: http://www.codescript.co.uk/ftp_con...

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question