Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 8140 invoked from network); 23 Mar 2006 19:51:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Mar 2006 19:51:24 -0000 Received: (qmail 62834 invoked by uid 500); 23 Mar 2006 19:51:18 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 62786 invoked by uid 500); 23 Mar 2006 19:51:17 -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 62751 invoked by uid 99); 23 Mar 2006 19:51:17 -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 11:51:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.78.35.133] (HELO besec550.swift.com) (194.78.35.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Mar 2006 11:51:15 -0800 Received: from besec560 (besec560.swift.com [172.24.88.20]) by besec550.swift.com (Switch-3.1.8/Switch-3.1.6) with ESMTP id k2NJhbWn029666 for ; Thu, 23 Mar 2006 19:43:38 GMT Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7233.11 Subject: RE: Get the modification time of a file into a property. Date: Thu, 23 Mar 2006 20:50:45 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Get the modification time of a file into a property. Thread-Index: AcZOo/6iEQzajf8PSaSL+jipw2HdXwADqUcQ From: "RADEMAKERS Tanguy" To: "Ant Users List" X-OriginalArrivalTime: 23 Mar 2006 19:50:48.0268 (UTC) FILETIME=[14DB80C0:01C64EB3] Received-SPF: none X-Flow-Control: Sendmail Flow Controller v1.4.0 besec550.swift.com k2NJhbWn029666 X-MASF: 0.00% X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Why not do it like this: if lastrun.txt doesn't exist,=20 use to generate the last run date/time and to write it to the file lastrun.txt else use to load lastrun.txt /t >-----Original Message----- >From: Anderson, Rob (Global Trade) [mailto:Rob.Anderson@nike.com]=20 >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 >document management system based on modification time. I plan=20 >to touch a >file (lastrun.txt) at the end of the process to capture the time that >the process ran, then during the next run somehow get the modification >time of that file into a property for use in my custom task.=20 >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 wrapper=20 >script to >get the value and pass it into Ant, but I would prefer to do=20 >this 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 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org