ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilbreath, Jason" <>
Subject fileset question
Date Tue, 21 Nov 2000 23:22:20 GMT
I apologize for the length, but I have a specific need:

	I have three directories: /new, /backup, /orig

	I am unjarring a file into /new which at the end of the process will
contain just directories (with files underneath of course) as:


		where a,b, and c are directories

	I need to backup directories of the same name (and the files
underneath) in /orig and move (or copy) them to /backup.

		for example,  /orig contains directories a,b,c,d,e and I
need to move a,b,c to /backup

	Once that is complete I need to move the directories in /new to
/orig (easy with a move task)

	The problem is this: I will never know the names of a,b,c (they can
change at any time) and I want to do it without copying all of /orig to

	I have tried using the following:

		<move todir="${backup}">
               		 <fileset dir="${orig}" >
                    			<patternset id="changes"
includesfile="${install.dir}/file.txt" />                           

	where file.txt contains the names of the directories in /new (a
simple ls -1 of the /new directory), but this simply moves an empty
directory to the backup directory (the copy task does the same thing).  

	In other words, the directories in /orig never get completely copied
to /backup, only the directory but not the files underneath the directory.  

	I have been through several other scenarios, all of which do not
work for the problem I have.

	If anyone has any ideas, it would be greatly appreciated.





View raw message