You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ramadoss Chinnakuzhandai <rc...@register.com> on 2004/02/25 18:50:24 UTC

[OT]Ant Script

Hi,
      Using Ant Script is it possible to detect the latest modified file by comparing the same file across two different locations and make them sync or override the old file with the latest modified file and make sure that same version of file exists on these two different location??


dirX/abc.jsp(timestamp as today)
                				====>ant script which will update abc.jsp under dirY with abc.jsp under dirX
dirY/abc.jsp(timestamp as yesterday)

is there any ANT guru to solve my "my brain's fuzzing"  

-Ramadoss





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT]Ant Script

Posted by Lucas Gonzalez <lu...@convergia.com.ar>.
Hi,
    I do not mean to be harsh or something, but a simple look at the doc
would have solved your problem
http://ant.apache.org/manual/CoreTasks/copy.html

    It´s on the second sentence!
        "Copies a file or FileSet to a new file or directory. By default,
files are only copied if the source file is newer than the destination file"

    Best Regards,
    Lucas


----- Original Message ----- 
From: "Ramadoss Chinnakuzhandai" <rc...@register.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, February 25, 2004 2:50 PM
Subject: [OT]Ant Script


Hi,
      Using Ant Script is it possible to detect the latest modified file by
comparing the same file across two different locations and make them sync or
override the old file with the latest modified file and make sure that same
version of file exists on these two different location??


dirX/abc.jsp(timestamp as today)
                ====>ant script which will update abc.jsp under dirY with
abc.jsp under dirX
dirY/abc.jsp(timestamp as yesterday)

is there any ANT guru to solve my "my brain's fuzzing"

-Ramadoss





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [OT]Ant Script

Posted by Manish Singla <Ma...@Sun.COM>.
As somebody suggested ant copy will solve ur problem.

But, just in case in your situaton above do not solve your problem in 
that case use following tasks to check modification date on ur own.

"condition"
"available"
"uptodate"



Ramadoss Chinnakuzhandai wrote:
> Hi,
>       Using Ant Script is it possible to detect the latest modified file by comparing the same file across two different locations and make them sync or override the old file with the latest modified file and make sure that same version of file exists on these two different location??
> 
> 
> dirX/abc.jsp(timestamp as today)
>                 				====>ant script which will update abc.jsp under dirY with abc.jsp under dirX
> dirY/abc.jsp(timestamp as yesterday)
> 
> is there any ANT guru to solve my "my brain's fuzzing"  
> 
> -Ramadoss
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


-- 
Thanks
Manish Singla
x73166


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org