From: "F. Senault" Date: 2009-04-03T01:54:39+09:00 Subject: Re: Ruby script to rebuild a directory structure Le Thu, 2 Apr 2009 06:20:56 -0500, Emmek On rails a �crit : > I have another question: how to force this script to copy only jpg, png > and gif files from the "logo" directory? (there are also some mouldy php > files I don't need ANYMORE) Even easier : iterate over Dir.glob("path/to/orig/**/*.{jpg,png,gif}"). (Add the File::FNM_CASEFOLD flag as a parameter if you have mixed case.) Fred -- Yay.