From user-return-55310-apmail-ant-user-archive=ant.apache.org@ant.apache.org Thu Mar 23 21:08:32 2006 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 49364 invoked from network); 23 Mar 2006 21:08:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2006 21:08:31 -0000 Received: (qmail 84899 invoked by uid 500); 23 Mar 2006 21:08:26 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 84868 invoked by uid 500); 23 Mar 2006 21:08:26 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 84857 invoked by uid 99); 23 Mar 2006 21:08:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 13:08:26 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [146.197.27.91] (HELO barriere241.nike.com) (146.197.27.91) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 13:08:25 -0800 X-Server-Uuid: BDE2CC8B-9671-48D4-9A25-CA756DA0A621 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Subject: RE: Get the modification time of a file into a property. Date: Thu, 23 Mar 2006 13:07:58 -0800 Message-ID: <200603232110.k2NLAiBO027208@barriere241.nike.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Get the modification time of a file into a property. Thread-Index: AcZOo/6iEQzajf8PSaSL+jipw2HdXwADqUcQAALJP2A= From: "Anderson, Rob (Global Trade)" To: "Ant Users List" X-OriginalArrivalTime: 23 Mar 2006 21:07:59.0203 (UTC) FILETIME=[DD1C1B30:01C64EBD] X-WSS-ID: 683DD1A51O41226457-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N That sounds like it would work. I'll give it a try. Thanks. -Rob A=20 > -----Original Message----- > From: RADEMAKERS Tanguy [mailto:Tanguy.RADEMAKERS@swift.com]=20 > Sent: Thursday, March 23, 2006 11:51 AM > To: Ant Users List > Subject: RE: Get the modification time of a file into a property. >=20 > Why not do it like this: >=20 > if lastrun.txt doesn't exist,=20 > use to generate the last run date/time and=20 > to write it to the file lastrun.txt else > use to load lastrun.txt >=20 > /t >=20 >=20 >=20 > >-----Original Message----- > >From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com] > >Sent: Thursday, March 23, 2006 7:03 PM > >To: user@ant.apache.org > >Subject: Get the modification time of a file into a property. > > > >I have a custom Ant task that I am using to extract documents from a=20 > >document management system based on modification time. I=20 > plan to touch=20 > >a file (lastrun.txt) at the end of the process to capture=20 > the time that=20 > >the process ran, then during the next run somehow get the=20 > modification=20 > >time of that file into a property for use in my custom task. > >Here is the > >sequence... > >=20 > >1. If lastrun.txt exists, get the modification time into a property. > >2. Extract the documents based on the property if it exists.=20 > >If property > >does not exist, just get everything. > >3. Touch the file lastrun.txt > >=20 > >I don't know how to accomplish step 1. I could write a=20 > wrapper script=20 > >to get the value and pass it into Ant, but I would prefer to do this=20 > >within Ant. > >=20 > >Thanks in advance. > >=20 > >=20 > > > >______________________ > >Robert Anderson > >Sr. System Engineer > >Nike - Global Trade IT > >503-532-6803 > > > >Never let me slip, cuz if I slip, then I'm slippin. - Dr. Dre > > > >=20 > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For=20 > additional commands, e-mail: user-help@ant.apache.org >=20 >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org