Topic: folder listing

i'd like to be able to list the contents of a folder, recursively or not it doesn't matter at this point, and have all *.jpgs be listed in a drop down combobox.

any hints?

i read somewhere about a find.rb helper i could use, but when I tried a find2.rb helper file i still couldn't really figure it out.

any suggestions, samples, anyone can point me to that make use of the file find.rb.

what goes where might be helpful, such as what goes in my controller, what goes in my view, etc.

consider me dumb. smile

thanks,
al

Last edited by alanpieroway (2006-11-25 12:48:11)

Re: folder listing

Recursive:

Dir[folder + "/**/*.jpg"]

Nonrecursive:
Dir[folder + "/*.jpg"]