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