• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

copy latest source using ANT

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have one critical problem. But I don't know how to solve it. A folder contains some zip files. Daily we stored some zip files into this folder.
At last we run a ant script it unzip the zip files i.,e which is copied today only. I have doubt how to find the copied files in current date (today). pls any one help me
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured this one out by using the ant manual.

Under "Concepts and Types" I found Selectors.


Core Selectors
Core selectors are the ones that come standard with Ant. They can be used within a fileset and can be contained within Selector Containers.

The core selectors are:

<contains> - Select files that contain a particular text string
<date> - Select files that have been modified either before or after a particular date and time
<depend> - Select files that have been modified more recently than equivalent files elsewhere
<depth> - Select files that appear so many directories down in a directory tree
<different> - Select files that are different from those elsewhere
<filename> - Select files whose name matches a particular pattern. Equivalent to the include and exclude elements of a patternset.
<present> - Select files that either do or do not exist in some other location
<containsregexp> - Select files that match a regular expression
<size> - Select files that are larger or smaller than a particular number of bytes.
<type> - Select files that are either regular files or directories.
<modified> - Select files if the return value of the configured algorithm is different from that stored in a cache.



Come on back with questions if you need help getting the <date> selector to work.
 
Raghu Shree
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for your reply. I have one more doubt. How can I change the below line "01/01/2001" to current date.


<fileset dir="${jar.path}" includes="**/*.jar">
<date datetime="01/01/2001 12:00 AM" when="before"/>
</fileset>

 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the TStamp task to get a formatted date string.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic