Thanks all for all your help. I think i understand them better now. I will be practising with more examples and hopefully ill get better at it.
Thanks On Fri, Dec 18, 2009 at 4:13 PM, David Weintraub <[email protected]> wrote: > On Fri, Dec 18, 2009 at 9:55 AM, Ziggy <[email protected]> wrote: > > In all your examples you refered to "files" but not directories. Did you > > mean files and directories? > > Filesets select files and not directories. If you want to select > directories, you use "dirset". > > > could you check the examples below and let me know if i got it right > > > >>exclude name="**/pages"/> > >>Takes all files from any subdir called "pages" but no subdir of pages > > You want "<exclude name="**/pages/*"> > > This will only select the files directly under the pages directory, > but not files that are located in subdirectories under pages. The "**" > is a wildcard match for files in the directory tree while the "*" is a > wildcard match just for the files in that directory. > > Again: <fileset> selects files and not directories. If you must match > on directories, you need to use <dirset>. 90% of the time, you use > <fileset> because you're interested in the files and not the > directories. > > So: > > <include name="**/pages/**"> > Will match > > * a/b/c/pages/1.txt > * a/b/c/pages/2.txt > * a/b/c/pages/d/1.txt > * a/b/c/pages/d/e/f/g/h/2.txt > > But, it won't match: > > * a/b/c/pages/ > * a/b/c/pages/d/ > * a/b/c/pages/d/e/f/ > * a/b/c/pages/d/e/f/g/h/ > > because those are DIRECTORIES. > > Meanwhile: > > <include name="**/pages/*"/> > > Will match > > * a/b/c/pages/1.txt > * a/b/c/pages/2.txt > > But it won't match: > > * a/b/c/pages/d/1.txt > * a/b/c/pages/d/e/f/g/h/2.txt > > -- > David Weintraub > [email protected] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
