Hehe whoever said that ruby is not verbose was WRONG!! ;)

I mean look at the code below! 

All this just to find subdirectories and to list all the jpg files inside!!
So... NOT!!! :) I hope the code posts well..

#code starts here
imgpath = "img/"
def seekPhotoDirs(path)
	require 'find'
	photodirs = Array.new
	
	Find.find(path) do |item|
		if FileTest.directory?(item)
			if item != path #ei haluta tt samaa hakemistoa
				puts indexImages(item)
			end
		end
	end
	return photodirs
end
def indexImages(dir)
	dir.each { |d|
 		Dir.entries(d).each { |filu| 
			nn = filu.to_s
			ext = filu.downcase.split(".").last
			if ( ext == "png" || ext == "jpg")
				puts filu
			end
		}
	}
end
puts seekPhotoDirs(imgpath)
#code ends here

Greetings to whytheluckystiff! Outfoxed, not sourced.

Csmr
-- 
Casimir Pohjanraito 
Art Portfolio: http://csmr.dreamhosters.com