From: Benjohn Barnes Date: 2006-04-01T21:46:58+09:00 Subject: Re: Examine Folder Contents? On 1 Apr 2006, at 13:41, Joshua Muheim wrote: > Hi all > > I'd like Ruby to open a folder, search it for files and then store all > files names of .png files in an array and close the folder. So after > this I can do anything I like with the png files in the array... > > How do I do this? Thanks a lot for help. :-) > Joshua You'll want the class Dir, and the class method glob. png_files = Dir.glob(File.join(path_of_folder, '*.png')) Cheers, Benj