From: Emmek on Rails Date: 2009-04-03T03:22:01+09:00 Subject: Re: Ruby script to rebuild a directory structure F. Senault wrote: > > 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 Sorry, what do You exactly mean? I want to copy just images from original location. I'm trying to do something with cp_r "public/uploaded/users/#{u.login[0..0]}/#{u.login}/logo/." but I don't know what to put at the end of this path to copy just jpgs, gifs and pngs. -- Posted via http://www.ruby-forum.com/.