ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Anderson <riz...@gmail.com>
Subject Re: <exec> task not accepting relative path
Date Mon, 02 Nov 2009 22:35:24 GMT
You need to use the wildcard in the includes attribute like this...

<fileset dir="." includes="**/Capital/*.txt"/>

I have tested that this works with the following...

<target name="touch">
        <touch>
                <fileset dir="." includes="**/Capital/*.txt"/>
        </touch>
</target>

After running this target, all the files in **/Capital have an been touched.

-Rob Anderson

On Sat, Oct 31, 2009 at 11:06 AM, cvsusr <spers@rediffmail.com> wrote:

>
> Hi,
>
> Thanks for your reply.
>
> I am not able to give relative path for Capital folder in filset.
>
> This is not working..
>
> <fileset dir="**/Capital/" includers="*.txt"/>
>
> i tried various patterns for relative path.. because the Capital folder
> will
> reside in any subdirectory. So I dont know the specific path to give. Hence
> providing the relative path. But its not getting resolved..
>
> Is there any way to do that?
>
> Thanks
>
>
> Scot P. Floess-2 wrote:
> >
> >
> > Why don't you use some of the built-in path functionality?
> >
> > <path  id = "txtFiles">
> >      <fileset  dir = "Capitial"  includes = "*.txt"/>
> > </path>
> >
> >
> > On Sat, 31 Oct 2009, cvsusr wrote:
> >
> >>
> >> Hi
> >>
> >> I need to find the folder named "capital" under the basedir and prepare
> >> filelist with extension *.txt under capital folder.
> >>
> >> For this I used <exec> task and gave like following, but its not
> >> accepting
> >> the relative path. This path varies according the base folder name we
> set
> >> in
> >> properties..  so what ever dir name given in properites file, it should
> >> search down for folder named "Capital" and store the list of files with
> >> extension *.txt.
> >>
> >> <exec dir="**/Capital/" executable="cmd">
> >> <arg line="/c dir *.txt /s /b>a.txt"/>
> >> </exec>
> >>
> >> but relative path is not getting resolved..
> >>
> >> Then i tried using properties like
> >>
> >> <property name="${build.path} location="${basedir}/**/Capital"/>
> >> and in exec task
> >> <exec dir="${build.path}" ...>
> >> but this path is also not getting resolved.
> >>
> >> Please help me to pass relative path to the <exec> task.
> >>
> >> Thanks
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/%3Cexec%3E-task-not-accepting-relative-path-tp26141943p26141943.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >> For additional commands, e-mail: user-help@ant.apache.org
> >>
> >>
> >
> > Scot P. Floess
> > 27 Lake Royale
> > Louisburg, NC  27549
> >
> > 252-478-8087 (Home)
> > 919-890-8117 (Work)
> >
> > Chief Architect JPlate   http://sourceforge.net/projects/jplate
> > Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
> >
> > Architect Keros          http://sourceforge.net/projects/keros
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/%3Cexec%3E-task-not-accepting-relative-path-tp26141943p26145089.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Rob Anderson
riznob@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message