Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list just filenames (ie not their path too)

Status
Not open for further replies.

sylverfox

Technical User
Aug 29, 2005
2
GB
Can anyone tell me is it possible to list a directory contents with just filenames (rather than the full filename which includes the path to the file included)
The code below gives me a list of all files in the current directory, but when I want to use them they are in the format of <path>/<filename>...e.g usr/home/ant/Manifest.mf


<fileset dir="." id="all.files">
<include name="*"/>
</fileset>
<pathconvert pathsep="," property="allfiles" refid="all.files"/>

what I want is just "Manifest.mf"

anyone any ideas ?

many thanks
 
I have found the answer :
<pathconvert property="sharedjars" pathsep=" ">
<path refid="shared.jars"/>
<mapper type="flatten"/>
</pathconvert>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top