Thanks for the solution, I may look at doing this in a custom task to avoid the BSF dependency but this should work one way or another.

-Eric wrote:
There is no task for that, but a core function in Ant's FileUtils which can be used


    <scriptdef name="relpath" language="javascript">
        <attribute name="property"/>
        <attribute name="base"/>
        <attribute name="file"/>
            propName = attributes.get("property");
            baseFile = attributes.get("base");
            file     = attributes.get("file");
            relPath  = FileUtils.getRelativePath(new File(baseFile), new File(file) );
            project.setNewProperty(propName, relPath);
    <target name="clean">
        <delete dir="x"/>
    <target name="prepare">
        <mkdir dir="x/a/b/c/d/e/f/g"/>
        <echo file="x/a/b/c/d/e/f/g/file.txt" message="test"/>
    <target name="test">
        <relpath property="rel" base="x/a/b" file="x/a/b/c/d/e/f/g/file.txt"/>
            File: x/a/b/c/d/e/f/g/file.txt
            Base: x/a/b
            rel : ${rel}


-----Ursprüngliche Nachricht-----
Von: Eric Dalquist [] 
Gesendet: Montag, 17. September 2007 17:10
Betreff: fileset exclude with full path

I have a full path to a directory that I want to create a 
fileset of and 
a full path to a sub-directory that I want to exclude.

I've tried the following and some variations on it:
<fileset id="projectFiles" dir="/a/b/c/" excludes="/a/b/c/d/**" />

No matter what I try I can't seem to get the excludes path to 
be honored.

I unfortunately do not have the ability to change the 
sub-directory path 
to a relative path instead of a full path, it is being populated from 
another task that I do not have control over.

Thank you,


To unsubscribe, e-mail:
For additional commands, e-mail: