In the previous example, you saw how MyCompany used the OpenURL method to retrieve some known files from an FTP server. Sarah, the IT officer who implemented the sales price list application, is pleased with how easy it was to automate the process and is thinking of using the Internet Transfer Control to help her with another routine task that she often has to perform involving transferring files across the Internet.
With so many different applications in use across the company network, it has become a painful chore to continually download the latest set of updates for each application. Each supplier of software to MyCompany has made available the latest set of updated files and information. Unlike in the previous example, however, the individual files are not specified. Each set of files exists in a directory. The idea is to retrieve the entire contents of each directory for each particular site. This way, Sarah can be sure that she has the latest and greatest set of files for the many applications she has to maintain.
Sarah decides that by using the Execute method, she can retrieve the contents of each directory by using the FTP command DIR. Each file can then be individually retrieved by the GET command. Some of the FTP servers will have password protection, so she also needs a way of supplying user name and password information. Again, like the sales price list application, the remote site information is stored in an Access database to provide centralized administration of the process. Error messages will also be logged to this database to ensure that any errors in the transfer process are recorded.
Sarah also knows that by using the Execute method, she will be able to easily modify this application so that at a later stage she can use it as the basis for distributing files from MyCompany to other Internet sites.
The Visual Basic project IntSoft.VBP in CHAP04/IntSoft contains an example project that performs this task. (See Figure 4-3 on page 186.)