This is what you should do if you are trying to get ANT to get;
1. File name with directory path from a location
Use the below code snippet in your build.xml
<path id="filewithpath">
<fileset dir="${location}">
<include name="*_myfile_*.xml"/>
</fileset>
</path>
${filewithpath} should evaluate as the file name with full directory path.
2. Only File name from a location
<path id="filewithpath">
<fileset dir="${location}">
<include name="*_myfile_*.xml"/>
</fileset>
</path>
<pathconvert property="filename" refid="filewithpath"/>
${filename} should evaluate as the file name.
Helpful? Please comment.
Happy Learning!!
1. File name with directory path from a location
Use the below code snippet in your build.xml
<path id="filewithpath">
<fileset dir="${location}">
<include name="*_myfile_*.xml"/>
</fileset>
</path>
${filewithpath} should evaluate as the file name with full directory path.
2. Only File name from a location
<path id="filewithpath">
<fileset dir="${location}">
<include name="*_myfile_*.xml"/>
</fileset>
</path>
<pathconvert property="filename" refid="filewithpath"/>
${filename} should evaluate as the file name.
Helpful? Please comment.
Happy Learning!!
No comments:
Post a Comment