From: Michael Weller Date: 2004-10-08T01:55:42+09:00 Subject: Re: Sth. wrong with File.file? (or with me) ts wrote: >>>>>>"M" == Michael Weller writes: > > > M> files = Dir.new(start_dir).to_a[2..-1] #remove . and .. > M> files.each do |f| > M> unless File.file? f then > > there is only the filename in `f' > Duh. I was almost sure it was me :-)) > svg% ls yyy > aaa > svg% > > svg% ruby -e 'Dir.new("yyy").each {|f| p f}' > "." > ".." > "aaa" > svg% > > you must add `start_dir' for the test File::file? > > you can also look at Find::find > > svg% ruby -rfind -e 'Find.find("yyy") {|f| p f}' > "yyy" > "yyy/aaa" > svg% > Thanks for your help! Yes,I think Find was what I was initially searching for. Sth. like Find::prune would have been my next task... Michael > > Guy Decoux > >