ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: SCP task to preserve exact time stamp
Date Wed, 24 Oct 2007 13:03:47 GMT


-----Original Message-----
From: venkata prasad [] 
Sent: Wednesday, October 24, 2007 2:13 PM
Subject: SCP task to preserve exact time stamp

   I have a requirement like when ever i do build, i need to copy all
database files/folders from build machine to UNIX machine.

Right now i am uasing SCP Ant task for secure copy. But  it is not
preserving time stamp for all files and folder.

So i went for 'scp' unix command in exec -ant task . It is preserving
stamp for some files and folders only.

Could some body help me,  in preserving time stamps for all folders and

the parameters -p -r should do the job

from the scp man page =

-p   Preserves modification times, access times, and modes
      from the original file.

-r   Recursively copy entire directories.

here's a snippet from one of my scripts =

<for list="${updatelist.@{Lum}}" param="copyfile">
<exec executable="ksh" failonerror="true">
<arg value="scp -p -r ./@{Lum}/serverdata@{copyfile}
svcscmcs@@@@@{server}:${scptarget}/@{Lum}/opt/andromeda@{copyfile}" />

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message