Hi savitha,

have u ever tried antelope jar. It's very good extention of ant and has a 
lot of interesting tasks. (eg. if -else etc.)
now for ur problem. It can be done very easily using fileutil task in 
antelope.jar 

something like this:

<taskdef name="fileutil" classname="ise.antelope.tasks.FileUtilTask"/>
<target name="abc">
        <fileutil file="${out_dir}" property="file_list">
            <listfiles includepath="no"/>
     </fileutil>

</target>

include path is the key here for ur problem.
for antelope reference use this url :  http://antelope.tigris.org/


cheers!!

Ankur Agarwal
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com



"Narahari 'n' Savitha" <[EMAIL PROTECTED]> 
05/06/2006 09:38 AM
Please respond to
"Ant Users List" <user@ant.apache.org>


To
user@ant.apache.org
cc

Subject
file list without directory prepended how to get it






Consider this scenario friends.

build.xml
    |
    |------------lib
                     |
                     |----------averyveryverylong.jar
                     |----------anotherlongjarfile.jar

now when I want to build a list of files in the lib folder I am using
<fileset dir="lib" id="hi">
    <include file=".jar" /<
</fileset>

I then use pathconvert

<pathconvert pathsep="," property="testing" refid="hi" />

what I am getting is
c:\lib\averyveryverylong.jar,c:\lib\anotherlongjarfile.jar

but that is not what I am expecting.

I am expecting just averyveryverylong.jar, anotherlongjarfile.jar

Can you help me out as to how to get this ?
-N

ForwardSourceID:NT0000C8D6 
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to