File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exclude of folder from being copied!?

 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

It is a little bit hard for me to explain this however I will give it a go. I am trying to use the fileset tag in ANT inside the copydir tag so that to copy some files from one directory to another. However would like to exlude a particular folder from the copy. I tried the following xml:



Where my folder structure is as follows:

Web
+-- images
+-- modules
+-- WEB-INF
+-- �

What I want is to copy the folder images and WEB-INF but not the folder modules. Is this possible, and if yes, then what am I doing wrong?

Thanks for any comments,

Regards,
Sim085
[ November 17, 2006: Message edited by: Simon Joseph Aquilina ]
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the obvious may be a typo difference between module and modules.

I don't remember this off the top of my head, but you probably need something like modules/** or module/** (is it plural or not), perhaps module/**/*

If that doesn't work try googling on ant exlude with copy or dir with or without site:ant.apache.org for some help.
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sorry for the typo .. it is modules, but the reason it did not work is not because of that ... made sure it was spelled right

Your solution worked fine <exclude name="modules/**"/> Thank you very much

Regards,
Sim085
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic