I quite like this solution. Thanks Jan.
Unfortunately, I also need the file size and date. I could do it in a script
(within ant, or a shell script called by your apply structure), but I think
I would prefer having a fileproperties task, placing in various properties
different info on the file.
for example
will generate a serie of properties :
file.size = 100
file.lastModifiedDate = 1/1/2002
...
I could then call this task + an echo into a file from an ant-contrib's
for-each
What do you think ? Or as someone already coded such a task ?
Benoit
-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: 19. december 2002 17:11
To: ant-user@jakarta.apache.org
Subject: AW: Having a file list
I have a solution with . Echo the name to a new file.
Lists the the fileset
Store the fileset in a text file and show it
With some *.txt and some *.java files in my directory the output is:
C:\tmp\anttests\dirListing>ant
Ant-Home: c:\seu\ant16
Java-Home: c:\seu\jdk14
Buildfile: build.xml
main:
[echo]
[echo] Lists the the fileset
[echo]
[apply] C:\tmp\anttests\dirListing\a.java
[apply] C:\tmp\anttests\dirListing\b.java
[apply] C:\tmp\anttests\dirListing\c.java
[echo]
[echo] Store the fileset in a text file and show it
[echo]
[echo] C:\tmp\anttests\dirListing\a.java
[echo] C:\tmp\anttests\dirListing\b.java
[echo] C:\tmp\anttests\dirListing\c.java
BUILD SUCCESSFUL
Total time: 1 second
So I recommend the second solution. :-)
Jan Matčrne
-----Ursprüngliche Nachricht-----
Von: Benoit Voisin [mailto:benoit.voisin@ergoidp.dk]
Gesendet am: Donnerstag, 19. Dezember 2002 16:47
An: 'Ant Users List'
Betreff: Having a file list
Hi all,
I am willing to have a list of files contains in a fileset, basically like a
dir/s will do under windows.
Does anyone know about such a task. It should be too hard to implement, but
if it already exists...
Thanks,
Benoit
--
To unsubscribe, e-mail:
For additional commands, e-mail:
--
To unsubscribe, e-mail:
For additional commands, e-mail: