[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

File Validation Checks with ANT

Posted on 2006-06-25
3
Medium Priority
?
250 Views
Last Modified: 2010-05-18
Hey,

I'm trying to test for empty files - ie files of 0 k size, and also trying to test for certain characters in a filename -  ie pattern matching.

I understand that ANT isn't really intended for these kind of tasks - but I'm hoping that there might be a way,


thanks
0
Comment
Question by:RichardStarkey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
bpmurray earned 1000 total points
ID: 16982953
You can use fileset. For example, to include all the files that have the extension ".txt" and to exclude those that start with an "X" (but not "x") and that have a size greator than zero ...

<fileset dir="/foo/bar">
  <patternset>
      <include name="**/*.txt" />
      <exclude name="**/X*.*" />
  </patternset>
  <size value="0" units="K" when="equal"/>
</fileset>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Starting up a Project

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question