ad info




CNN.com
 MAIN PAGE
 WORLD
 ASIANOW
 U.S.
 LOCAL
 POLITICS
 WEATHER
 BUSINESS
 SPORTS
 TECHNOLOGY
   computing
   personal technology
   space
 NATURE
 ENTERTAINMENT
 BOOKS
 TRAVEL
 FOOD
 HEALTH
 STYLE
 IN-DEPTH

 custom news
 Headline News brief
 daily almanac
 CNN networks
 CNN programs
 on-air transcripts
 news quiz

  CNN WEB SITES:
CNN Websites
 TIME INC. SITES:
 MORE SERVICES:
 video on demand
 video archive
 audio on demand
 news email services
 free email accounts
 desktop headlines
 pointcast
 pagenet

 DISCUSSION:
 message boards
 chat
 feedback

 SITE GUIDES:
 help
 contents
 search

 FASTER ACCESS:
 europe
 japan

 WEB SERVICES:
COMPUTING

How to make downloads easier in Windows

August 25, 1999
Web posted at: 12:20 p.m. EDT (1620 GMT)

by Brian Livingston, InfoWorld columnist

From...
InfoWorld

(IDG) -- Every day, the Internet is becoming more influential to the way business is done. You might think that some of the Windows tools used to transfer files across the Net would be easier to find and use.

Most of us who surf the Web have probably clicked a link on a Web site to download a shareware utility, a text file, or some other resource. But most Web users probably don't know about a simple way to automate the process of downloading (or uploading) files.
MORE COMPUTING INTELLIGENCE
IDG.net   IDG.net home page
  InfoWorld home page
  InfoWorld forums home page
  InfoWorld Internet commerce section
  Get Media Grok and The Industry Standard Intelligencer delivered for free
 Reviews & in-depth info at IDG.net
  IDG.net's personal news page
  Year 2000 World
  Questions about computers? Let IDG.net's editors help you
  Subscribe to IDG.net's free daily newsletter for IT leaders
  Search IDG.net in 12 languages
 News Radio
 * Fusion audio primers
 * Computerworld Minute
   

For this task, Microsoft includes in Windows 98, Windows NT, and Windows 2000 a program called ftp. This program supports the File Transfer Protocol, or FTP, an Internet standard for moving data from one place to another. When you click a Web link to download a file, it's likely that the transfer is done using FTP.

Unfortunately, ftp is a text-mode command, and there's nothing in the Windows 98 Help system that mentions anything about ftp. The program is listed in the Windows NT and Windows 2000 Help, but there's almost nothing about using it to automate your routine tasks.

Reader Bob Nolte finds the automation aspects of ftp extremely useful. He's the owner of Personal Computers for You, a consultancy in Eden Prairie, Minn.

Nolte uses ftp to download weekly updates of anti-virus definition files for his clients' networks. To automate the process on networks that may support hundreds of PCs, he uses a tiny script file on NT Server.

If you've never used the ftp program, its command-line syntax looks like this:

    ftp {options} {-s:filename} {hostname}

For details about this syntax, open a DOS window and type ftp -? (using /? doesn't work). Or type ftp into the Index box in Windows NT or 2000 Help, then click Display.

Typing ftp at a command-line prompt starts an FTP session. You can then type commands interactively to connect to a remote host, access its resources, and then disconnect using the bye command. In order to use ftp, you must be using a computer that has the TCP/IP protocol installed.

Nolte uses a small batch file called download.bat, which automates his anti-virus updates. This batch file connects to an Internet host that we'll call ftp.getfiles.com.

In the batch file shown below, the FTP program reads a script file called down.txt. That script downloads an anti-virus definition file called update.exe. All of this is logged to another text file called ftp.log. Nolte can check this log to make sure everything worked properly.

The contents of download.bat look like this:

    d:
    cd \data
    echo Start of download>ftp.log
    ftp -s:down.txt ftp.getfiles.com>>ftp.log
    echo End of download>>ftp.log

In the above batch file, the redirection sign (>) in line 3 creates a new ftp.log text file. In lines 4 and 5, the append sign (>>) adds output text to this file.

Nolte's script file, down.txt, contains the following commands, which ftp executes on the remote host. The first two lines enter an ID and password. The script then changes directories, downloads update.exe, closes the session with the host, and exits.

    anonymous
    me@nonet.com
    cd pub/software
    lcd d:\data
    bin
    hash
    get update.exe
    close
    bye

Nolte points out that this method is just as useful for uploads as it is for downloads. This makes it handy for any situation in which you must exchange files with a host regularly.

Send tips toBrian Livingston. He regrets that he cannot answer individual questions. His latest book is Windows 98 Secrets (IDG Books.


RELATED STORIES:
Compaq dups Windows NT on Alpha
August 24, 1999
The Web is one big popularity contest
August 11, 1999
Top 10 Downloads for Home
July 9, 1999

RELATED IDG.net STORIES:
FTP, naturally
(PC World Online)
Macro Express utility can help automate routine Windows tasks and repetitive typing
(InfoWorld Electric)
Readers suggest free or inexpensive tools that can help improve Windows' performance
(InfoWorld Electric)
Minor upgrade for popular FTP client
(PC World Online)
Serious FTP
(SunWorld)
LapLink puts FTP in reach
(PC World Online)
Note: Pages will open in a new browser window
External sites are not endorsed by CNN Interactive.

RELATED SITES:
Personal Computers For You
Microsoft Corp.
Web Teacher's FTP Primer
Note: Pages will open in a new browser window
External sites are not endorsed by CNN Interactive.
 LATEST HEADLINES:
SEARCH CNN.com
Enter keyword(s)   go    help

Back to the top   © 2001 Cable News Network. All Rights Reserved.
Terms under which this service is provided to you.
Read our privacy guidelines.