Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5982933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:09:29+00:00 2026-05-22T22:09:29+00:00

When using concat with fileset in Ant, how do I make an action happen

  • 0

When using concat with fileset in Ant, how do I make an action happen for each element in the fileset. Such as, adding a string:

<fileset dir="${project.path.scripts-library}"
                excludes="!*.js, **/*.bak, **/dev.*"
>
    <type type="file" />
    <include name="**/0*.js" />
    <include name="**/1*.js" />
    <string>test</string>
</fileset>

Or echoing the current file name for each file in the fileset (and, how do I GET the file name for the current file???):

<fileset dir="${project.path.scripts-library}"
                excludes="!*.js, **/*.bak, **/dev.*"
>
    <echo file="${app.path.file}" 
            append="true"
            message=",${the.file.name}" />

    <type type="file" />
    <include name="**/0*.js" />
    <include name="**/1*.js" />
</fileset>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:09:30+00:00Added an answer on May 22, 2026 at 10:09 pm

    I think there is no such thing in default ant. The closest one is <apply>, but it’s system specific:

    <apply executable="echo"> <!-- run this command with each file name -->
      <fileset dir="/tmp" includes="**/*.*"/>
    </apply>
    

    Also you can install ant-contrib to enable <for> task:

    <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
    <for param="file">
      <path>
        <fileset dir="/tmp" includes="**/*.*"/>
      </path>
      <sequential> <!-- run any task here -->
        <echo>file [@{file}]</echo>
      </sequential>
    </for>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my matlab m-file I am using some logic (string concat) to build variables
Possible Duplicate: Concat all strings inside a List<string> using LINQ I am using C#
I need to do a HTML string concat (using PHP or Javascript) and I
I'm using StringBuffer in Java to concat strings together, like so: StringBuffer str =
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
I am using the MSBuild copy and then Concat to concatenate multiple SQL files.
im using this query SELECT DISTINCT pr.competitorID AS compID, pr.age, CONCAT(pr.firstname, ' ', pr.lastname)AS
NOTE: I tried using concat() method, join method and even tried to insert just
What is the reason, that using CONCAT() in pure UTF-8 environment MySQL still treats

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.