# Ant User Manual

## Get

### Description

Gets a file from a URL. When the verbose option is "on", this task displays a '.' for every 100 Kb retrieved.

This task should be preferred above the CVS task when doing automated builds. CVS is significantly slower than loading a compressed archive with http/ftp.

The usetimestamp option enables you to control downloads so that the remote file is only fetched if newer than the local copy. If there is no local copy, the download always takes place. When a file is downloaded, the timestamp of the downloaded file is set to the remote timestamp, if the JVM is Java1.2 or later. NB: This timestamp facility only works on downloads using the HTTP protocol.

### Parameters

Attribute | Description | Required
src | the URL from which to retrieve a file. | Yes
dest | the file where to store the retrieved file. | Yes
verbose | show verbose progress information ("on"/"off"). | No
ignoreerrors | Log errors but don't treat as fatal. | No
usetimestamp | conditionally download a file based on the timestamp of the local copy. HTTP only | No

### Examples

      <get src="http://jakarta.apache.org/" dest="help/index.html"/>

Gets the index page of http://jakarta.apache.org/, and stores it in the file `help/index.html`.

      <get src="http://jakarta.apache.org/builds/tomcat/nightly/ant.zip"
    	dest="optional.jar"
    	verbose="true"
    	usetimestamp="true"/>

Gets the nightly ant build from the tomcat distribution, if the local copy is missing or out of date. Uses the verbose option for progress information.

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.