From: "baumanj@..." Date: 2006-04-03T00:28:44+09:00 Subject: Re: Examine Folder Contents? This is operating on the actual filesystem, so you have to use real paths, not the URI for the web application. Try this: File.join(RAILS_ROOT, 'public') @images = Dir.glob(File.join(RAILS_ROOT, 'public/images/content/parties/photo_galleries/1/'), '*.jpg') Joshua Muheim wrote: > > You'll want the class Dir, and the class method glob. > > png_files = Dir.glob(File.join(path_of_folder, '*.png')) > > > > Cheers, > > Benj > > Thank you so far. I'm using this in Ruby on Rails and tried the > following: > > @images = Dir.glob('/images/content/parties/photo_galleries/1/', > '*.jpg') > > Sadly this delivers me an empty array, but there are about 20 jpg files > in this folder... :-/ > > Thanks for help... Josh > > -- > Posted via http://www.ruby-forum.com/.