On 19.12.2004, at 06:37, itsme213 wrote: > Thanks, I'll keep that as a backup. But I should have been more > explicit ... > >>> I am doing >>> FileUtils.cp_r( "source/.", "generated") >>> to copy a directory tree. >>> >>> How can I prune out any sub_tree with /.svn/ ? > > How can I prune out any sub_tree with /.svn/ in its path from even > being > copied over in the first place? See the hard way. It collects a list of directories that don't have .svn in the path, then collects all files that are in that list of directories, then... oops, forgot to make it first create the directories (now empty dirs aren't created.) Anyhow. 1. mkdir every directory in the list of directories to target dir (and set permissions to match) 2. copy every file from list of files to target dir Or did you want to do something different..? -Ilmari