Directories and Files processing

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