YEs, use the file:: functions. There is one to get the create date and one to 
get the modify date.

file::get-last-write-time() is what you are looking for as far as I can tell.

BOb


> -----Original Message-----
> From: Phil Sayers [mailto:p...@cds-am.net]
> Sent: Tuesday, August 11, 2009 11:22 AM
> To: nant-users@lists.sourceforge.net
> Subject: [NAnt-users] howto: read file last modified date/time.
> 
> Hi
> 
> I don't see an out-of-the-box nant file function to read the last
> modified
> date/time of a file into a property.  The opposite of the 'touch' task.
> I checked nantcontrib and I didn't see anything there (unless I missed
> it)
> 
> Is anyone away of an existing library or code snippet I can copy/paste
> that
> may accommodate this before I go an re-invent the wheel?
> 
> Thanks
> Phil
> 
> 
> -----------------------------------------------------------------------
> -------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> trial. Simplify your report design, integration and deployment - and
> focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to