Link to home
Start Free TrialLog in
Avatar of duncan320
duncan320Flag for United Kingdom of Great Britain and Northern Ireland

asked on

FTP via VBS script

I have very basic knowledge of writing .vbs scripts.

I need a very basic script that will copy say all *.sql from a server to say c:\ftp on the PC it is been run on, i have no idea how to do this, but i need to do the following :

connect to the ftp server
with username & password
change into a certain directory say /etc/backup on the remote server
and then copy *.sql to c:\ftp
disconnect

Can someone please provide me with an example.  Im sure this will be a few lines of code, but it knowing what.

Many Thanks
Avatar of lunchbyte
lunchbyte

This is not a few lines of code, it is a little bit more involve. Are you using vb6?
Here is a sample codes from freevbcode.com. Good place to get samples and they have few sample codes for FTP.

http://freevbcode.com/ShowCode.Asp?ID=731
Avatar of duncan320

ASKER

I was hoping to do it with a VBS script if i can.

Have tried the like given by lunchbyte but it wont let me download the file it says its invalid or corrupted.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of hes
hes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial