> how can I track/manipulate an arbitrary number of sub directories > while tracking the location of every parent dir. I can gather a list of > subdirectories of any current directory but i need an acurate tracking > to make sure every directory is searched. Should I use some sort of > stack counter or recursive function? I've always liked recursion. I just threw this together. Forgive me if it doesn't work perfectly. It's a five minute throw together... # doesn't handle dotfiles... def drecurse(dirname) Dir.open(dirname) do |dir| dir.each do |file| if test(?d, "#{dirname}/#{file}") next if file =~ /^\./ puts "dir - #{dirname}/#{file}" drecurse("#{dirname}/#{file}") else # Do something with file end end end end drecurse(".") - Travis Whitton <whitton / atlantic.net>