That sounds like it would work. I'll give it a try. Thanks. -Rob A
> -----Original Message----- > From: RADEMAKERS Tanguy [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 23, 2006 11:51 AM > To: Ant Users List > Subject: RE: Get the modification time of a file into a property. > > Why not do it like this: > > if lastrun.txt doesn't exist, > use <tstamp> to generate the last run date/time and > <echo file="lastrun.txt"> to write it to the file lastrun.txt else > use <loadfile> to load lastrun.txt > > /t > > > > >-----Original Message----- > >From: Anderson, Rob (Global Trade) [mailto:[EMAIL PROTECTED] > >Sent: Thursday, March 23, 2006 7:03 PM > >To: [email protected] > >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 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: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
