aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Exclude of folder from being copied!? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Exclude of folder from being copied!?" Watch "Exclude of folder from being copied!?" New topic
Author

Exclude of folder from being copied!?

Simon Joseph Aquilina
Ranch Hand

Joined: Feb 14, 2006
Posts: 102
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

Joined: Oct 10, 2000
Posts: 1364
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

Joined: Feb 14, 2006
Posts: 102
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exclude of folder from being copied!?