From: Aldric Giacomoni <"aldric[remove]"@...> Date: 2008-12-05T23:04:00+09:00 Subject: Re: Directories and Files processing Is it an option to do something like this? Dir.chdir("root") Dir.glob('*') do |f| (enter stuff here) end Albert Lao-an wrote: > I am trying to use Shoes to iterate files in a directory and I just > cannot have it work: > > files = Dir.entries("root") > files.each {|f| > @data = IO.read(f) > tokens = tokenize(@data) > next_token > while not @current_token.nil? > read_input > next_token > end > @tokens = nil > @data = nil > > } > > > ##@data = IO.read("C:\\Shoes\\TxtBrx5\\root\\goo") > ##@tokens = tokenize(@data) > ##next_token > ##while not @current_token.nil? > ##read_input > ##next_token > ##end > ##@tokens = nil > ##@data = nil > > Apparently, those in comment work but iteration does not. Tried several > methods with Dir with no success. > > Thanks