From: William James Date: 2007-07-29T09:50:02+09:00 Subject: Re: FileUtils in widows On Jul 28, 6:58 pm, Gavin Sinclair wrote: > On Jul 29, 8:24 am, Jon Dale wrote: > > > >> files.each do |f| > > >> next if f == "." or f == ".." > > >> FileUtils.copy(dir,newdir) > > > > You forgot to use f in this line. > > > Isn't the f covered in the do statement? I'm not sure how else f would > > be implemented. > > FileUtils.copy(f, newdir) Or FileUtils.copy( "#{dir}/#{f}", newdir) FileUtils.copy isn't a mind-reader. It doesn't know (or assume) that you have put the name of the file in variable named f. It doesn't know that it is being invoked inside of a loop.