Cool ;-) And congratulations ;-) Are you running on *nix? I would guess so, because of your from="${web.src.dir}/". I'm not 100% sure, but I believe you have to be careful with the path separator you use. To be really cross-platform, you should do:
<property name="web.src.dir" location="..." /> <fileset id="myfiles" dir="${web.src.dir}/images"> <include name="*.gif" /> <include name="*.jpg" /> </fileset> <pathconvert pathsep="," property="files" refid="myfiles"> <map from="${web.src.dir}${file.separator}" to="" /> </pathconvert> <delete> <fileset dir="${web.deploy.dir}" includes="${files}" /> </delete> Note the use of <property location="" /> for the property used in <map from=""/> and the use of ${file.separator} instead of /. But if you are on Windows, then I'm wrong. --DD -----Original Message----- From: Nathan Christiansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 3:56 PM To: Ant Users List Subject: RE: Patternsets and Filesets Success. For those who are interested, here is the final code: <fileset id="myfiles" dir="${web.src.dir}/images"> <include name="*.gif" /> <include name="*.jpg" /> </fileset> <pathconvert pathsep="," property="files" refid="myfiles"> <map from="${web.src.dir}/" to="" /> </pathconvert> <delete> <fileset dir="${web.deploy.dir}" includes="${files}" /> </delete> -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 1:34 PM To: 'Ant Users List' Subject: RE: Patternsets and Filesets True... Sorry I missed that. Either one can work something out using <mapper>s (not my specialty ;-), or with <pathconvert property="files" refid="myfiles"> <mapper .../> </pathconvert> then <fileset dir="..." includes="${files}" /> Please look into it first, and if you're stuck I might try it. Or somebody knows a better alternative. --DD -----Original Message----- From: Nathan Christiansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 2:28 PM To: Ant Users List Subject: RE: Patternsets and Filesets But this deletes the files from the ${web.src.dir} directory not the ${web.deploy.dir}. -- Nathan -----Original Message----- From: Dominique Devienne [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 1:13 PM To: 'Ant Users List' Subject: RE: Patternsets and Filesets Use Ids: <fileset id="myfiles" dir="${web.src.dir}/images"> <include name="*.gif" /> <include name="*.jpg" /> </fileset> <delete quiet="true"> <fileset refid="myfiles" /> </delete> --DD -----Original Message----- From: Nathan Christiansen [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 1:51 PM To: 'Ant Users List' (E-mail) Subject: Patternsets and Filesets I have been looking over patternsets anf filesets and am not quite sure how to do what I want to do. What I want to do is: 1. Get a listing of all files in directory A. 2. Save the list into a property or equivalent. 3. Use the list to select which files to delete from directory B. Step 1 is easy: <fileset dir="${web.src.dir}/images"> <include name="*.gif" /> <include name="*.jpg" /> </fileset> For Step 2 I don't know how to save this result into a variable. And for step 3 I would like to: <delete> <fileset dir="${web.deploy.dir}/images"> <[Saved File Listing from Step 2]> </fileset> </delete> So if I have 3 files in ${web.src.dir} I would like to delete the same three files from ${web.deploy.dir} without touching the other files in ${web.deploy.dir}. Is it possible to use patternsets for this or are patternsets used for saving the include and exclude patterns only and not for saving the results of the task. If not patternsets then how? -- Nathan Christiansen x2421 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>