Any easy way to do this is to create a small script that will login to the
server, go to the source directory on the FTP server, change the destination
directory of the receiving machine to the correct path, get the file and
close out. Then shell the FTP command with the script.
The shell command is:
c:\windows\ftp -i -s:<FileName>
The script shoul look something like this.,
open <Server Name>
lcd <Destination Drive and Path>
cd /<Source path on FTP Server>
mget (or Get)<File Name or wildcard *, *.TXT>
mdel (or Del)<File Name or wildcard *, *.TXT >
(The next two lines were just to change to the system directory and get a
file called alldone which the calling program used to exit the loop entered
to hold execution of the calling program until this script was done. This
can be done more efficiently using the ShellAndWait API call in VB.)
I would have the VB program create this script then use the API ShellAndWait
to shell the above command line. I would also ensure I used either an API
call or some other logic to determine which path the ftp program was in,
Windows, WINNT, WIN, etc.
I hope this helps. If you'd like a sample program feel free to ask or check
for more detailed examples of using winstock and other methods. Just search
on FTP. You should get a few decent examples.
I hope this helps.
Programmer / Analyst
Computing and Network services
From: n_ajayan@y... [mailto:n_ajayan@y...]
Sent: Thursday, February 14, 2002 6:33 AM
Subject: Downloading files from FTP site
Hello to all,
I am developing a software which require automatic updation. Datas which
should be updated are kept in a ftp site. Only thing I have to do is to
copy the files from the ftp site to my system directory. Directory
informations are stored in Registry.
Can anyone help in this.
Subject: Re: MS Access reports through Visual Basic
Date: Thu, 14 Feb 2002 12:41:50
Reply-To: "Discuss VB Websites" <vb_websites_discuss@p...>
You know Crystal Reports? It is easier to create reports through Crystal
Reports and have close association with Visual Basic. Or other wise, try
to build report in Access itself and try access it through Visual Basic
Trade Soft Technologies.