You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by g d <co...@hotmail.com> on 2001/09/28 00:10:00 UTC

Timestamped Files

Hey:
I want to create timestamped files.

In the code below, the zip file that gets created has to have a timestamp in 
it. How can I achieve that. Thanks in advance

<?xml version="1.0"? encoding="iso-8859-1"?>
<project name="package" default="package" basedir=".">
	<target name="init">
		</tstamp>
		<property name="dist.dir" value="./dist"/>
	</target>

	<target name="package" depends="init">
	  <zip zipfile="${dist.dir}/package.zip"	basedir="."
       		excludes="${dist.dir}/*,${dist.dir}/**"/>
	</target>

</project>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Re: Timestamped Files

Posted by Shyam Koppikar <vk...@tds.net>.
----- Original Message -----
From: "g d" <co...@hotmail.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, September 27, 2001 3:10 PM
Subject: Timestamped Files


> Hey:
> I want to create timestamped files.
>
> In the code below, the zip file that gets created has to have a timestamp
in
> it. How can I achieve that. Thanks in advance
>
> <?xml version="1.0"? encoding="iso-8859-1"?>
> <project name="package" default="package" basedir=".">
> <target name="init">
> </tstamp>
> <property name="dist.dir" value="./dist"/>
> </target>
>
> <target name="package" depends="init">
>   <zip zipfile="${dist.dir}/package.zip" basedir="."
>        excludes="${dist.dir}/*,${dist.dir}/**"/>
> </target>
>
> </project>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>


Re: Timestamped Files

Posted by Shyam Koppikar <vk...@tds.net>.
----- Original Message -----
From: "Erik Hatcher" <ja...@ehatchersolutions.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, September 27, 2001 3:56 PM
Subject: Re: Timestamped Files


> Use the <tstamp> task.   It will provide you with Ant properties you can
use
> in your zipfile attribute.  I'm assuming you are wanting to name the file
> with a date in it (it wasn't clear what you meant by "have a timestamp in
> it").
>
>     Erik
>
>
> ----- Original Message -----
> From: "g d" <co...@hotmail.com>
> To: <an...@jakarta.apache.org>
> Sent: Thursday, September 27, 2001 3:10 PM
> Subject: Timestamped Files
>
>
> > Hey:
> > I want to create timestamped files.
> >
> > In the code below, the zip file that gets created has to have a
timestamp
> in
> > it. How can I achieve that. Thanks in advance
> >
> > <?xml version="1.0"? encoding="iso-8859-1"?>
> > <project name="package" default="package" basedir=".">
> > <target name="init">
> > </tstamp>
> > <property name="dist.dir" value="./dist"/>
> > </target>
> >
> > <target name="package" depends="init">
> >   <zip zipfile="${dist.dir}/package.zip" basedir="."
> >        excludes="${dist.dir}/*,${dist.dir}/**"/>
> > </target>
> >
> > </project>
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp
> >
> >
>


Re: Timestamped Files

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Use the <tstamp> task.   It will provide you with Ant properties you can use
in your zipfile attribute.  I'm assuming you are wanting to name the file
with a date in it (it wasn't clear what you meant by "have a timestamp in
it").

    Erik


----- Original Message -----
From: "g d" <co...@hotmail.com>
To: <an...@jakarta.apache.org>
Sent: Thursday, September 27, 2001 3:10 PM
Subject: Timestamped Files


> Hey:
> I want to create timestamped files.
>
> In the code below, the zip file that gets created has to have a timestamp
in
> it. How can I achieve that. Thanks in advance
>
> <?xml version="1.0"? encoding="iso-8859-1"?>
> <project name="package" default="package" basedir=".">
> <target name="init">
> </tstamp>
> <property name="dist.dir" value="./dist"/>
> </target>
>
> <target name="package" depends="init">
>   <zip zipfile="${dist.dir}/package.zip" basedir="."
>        excludes="${dist.dir}/*,${dist.dir}/**"/>
> </target>
>
> </project>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>