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

  • SEARCH
  • Home
  • 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 7657911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:07:37+00:00 2026-05-31T13:07:37+00:00

I have the following ant target: <delete> <fileset dir=${qnaire_dir} includes=**/*~ /> </delete> It does

  • 0

I have the following ant target:

  <delete>
    <fileset dir="${qnaire_dir}" includes="**/*~" />
  </delete>

It does not delete the following files:

./DETAILS~
./qnaire/__init__.py~
./qtest.py~
./README~

What is the correct includes value to match these files?

  • 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-31T13:07:39+00:00Added an answer on May 31, 2026 at 1:07 pm

    I found the answer! The syntax I was looking for:

      <defaultexcludes remove="**/*~" />
      <delete>
        <fileset dir="${qnaire_dir}" includes="**/*~" />
      </delete>
      <defaultexcludes default="true" />
    

    After skimming the ant documentation for the delete task (http://ant.apache.org/manual/Tasks/delete.html) half a dozen times, I finally actually noticed this statement:

    If you use this task to delete temporary files created by editors and it doesn’t seem to work, read
    up on the default exclusion set in Directory-based Tasks, and see the defaultexcludes attribute
    below.

    So I went and read about defaultexludes. Turns out that by default ant excludes a set of file expressions from all directory based tasks. These are listed here: http://ant.apache.org/manual/dirtasks.html#defaultexcludes

    Adding the first defaultexludes element and removing ‘*~’ from the list allows the subsequent delete task to do the right thing. The second defaultexcludes element puts the default exclusion list back in place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following tasks in ant: <target name=init-junit depends=init> <mkdir dir=${junit.reports.individual} /> <property
I have the following in my build.xml: <target name=compile.baz depends=init> <javac destdir=${build.dir}/classes debug=on> <compilerarg
I have the following ant task: <target name=test> <replace file=test.txt token=smth value=anything/> </target> test.txt
I have the following ant file that is not running the targets prepForDeployment and
I have following target in mz ant script to build my java application <target
I have following ant mail task - <target name=sendtestreport > <mail mailhost=smtp.com mailport=1025 subject=Test
I have following ant file to build. But unfortunately <project default=build.deploy.start basedir=.> <property name=target.dir
I am brand new to Ant. I would like to have the following: <target
I have just translated an ant project into maven however since maven does not
I have the following in my pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant-plugin</artifactId> <version>2.3</version> <configuration> <target> <echo

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.