Downloads
6192.zip

\[Editor's note: Email your scripting solutions (400 words or less) to Reader to Reader at win32sj@winntmag.com. Please include your script and phone number. We'll edit submissions for style, grammar, and length. If we print your contribution, you receive $100.\]

I use Microsoft Internet Information Server (IIS) 4.0's FTP server function to regularly update client virus software over a WAN. The files in Listings 1 and 2 download relevant virus software updates from the parent company to my local FTP server. During startup, the local FTP server then updates the local client virus software.

GetUpdt.cmd in Listing 1 contains the FTP command. This command calls updt.txt in Listing 2, which controls the batch FTP process. In this process, FTP uses an anonymous account to log on to the parent company's target server and then uses the mget subcommand to retrieve all the virus software update files.

I put updt.txt in the destination directory for the virus software update files. In GetUpdt.cmd, ftpservername is the name of the server that stores the files I want to download from the parent company's FTP server.

After the batch process executes, GetUpdt.cmd redirects the command's output to got.txt and loads that file into Notepad so that I can see whether the download was successful. If you want to transfer the downloaded files to a UNIX server, you use the code in Listing 3. I use Microsoft Internet Explorer (IE) 5.0's Scheduled Tasks function to schedule GetUpdt.cmd to run weekly.

If you're unfamiliar with FTP commands, Windows NT's Help file contains descriptions of them. On the Index tab, go to Commands, Windows NT and click Display. In the dialog box that appears, select Commands Index and click Display. Select ftp commands.

—Steve Kiss
stevekiss@mail.matav.hu