Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 51078 invoked from network); 28 Mar 2006 20:04:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Mar 2006 20:04:24 -0000 Received: (qmail 9719 invoked by uid 500); 28 Mar 2006 20:04:19 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 9670 invoked by uid 500); 28 Mar 2006 20:04:18 -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 9659 invoked by uid 99); 28 Mar 2006 20:04:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 12:04:18 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [204.127.200.84] (HELO sccrmhc14.comcast.net) (204.127.200.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 12:04:17 -0800 Received: from [192.168.99.99] (c-67-183-173-167.hsd1.wa.comcast.net[67.183.173.167]) by comcast.net (sccrmhc14) with SMTP id <2006032820035501400c7d3re>; Tue, 28 Mar 2006 20:03:56 +0000 Date: Tue, 28 Mar 2006 12:03:53 -0800 (PST) From: Dale Anson X-X-Sender: danson@maus.germane-software.com To: Ant Users List Subject: Re: Get the modification time of a file into a property. In-Reply-To: <200603231805.k2NI5mBO011232@barriere241.nike.com> Message-ID: References: <200603231805.k2NI5mBO011232@barriere241.nike.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N If you're not opposed to more custom tasks, there is a FileUtil task in Antelope (antelope.tigris.org) that will get the last modified time. Dale On Thu, 23 Mar 2006, Anderson, Rob (Global Trade) wrote: > I have a custom Ant task that I am using to extract documents from a > document management system based on modification time. I plan 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. Here is the > sequence... > > 1. If lastrun.txt exists, get the modification time into a property. > 2. Extract the documents based on the property if it exists. If property > does not exist, just get everything. > 3. Touch the file lastrun.txt > > I don't know how to accomplish step 1. I could write a wrapper script to > get the value and pass it into Ant, but I would prefer to do this within > Ant. > > Thanks in advance. > > > > ______________________ > 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 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org