glmxndr
glmxndr

Reputation: 46586

Ant : find the last folder in a folder

I have a folder path stored in the property nightly.basepath (here the value would be /path/to/my/nightly) :

/path/to/my/nightly
  |- build_20100310
  |- build_20100311
  |- build_20100312

I want to get the folder of the lastly generated build in the nightly.basepath folder, and store the path to this last folder in the nightly.last property. (So here, the value of nightly.last should be /path/to/my/nightly/build_20100312.)

Assume the alphabetical order reflects chronological order.

What is the easiest way to do that in Ant ?

Upvotes: 2

Views: 1199

Answers (1)

TofuBeer
TofuBeer

Reputation: 61526

You could try the ant-contrib TimestampSelector. I haven't used that particular task but I have used other ones in ant-contrib and haven't had any issues with them.

Upvotes: 3

Related Questions