File Iteration

Hi all... i have folder named test in my application's public folder . i want to iterate that folder named test which is in public folder. for that i tried this code it gives me error like

What code :slight_smile: ? Dir.each, Dir.glob, Dir.entries can all be useful for
this sort of thing.

Fred

try this

Dir.foreach(RAILS_ROOT + '/public/javascripts') do |filename| puts filename end