On Mon, May 9, 2011 at 3:45 PM, flebber <flebber.crue / gmail.com> wrote: > > require 'fileutils' > > def cleanFiles() > =A0dir =3D 'C:\Users\RenshawFamily\maven\Music\Foo Fighters\Live At > Wembley Stadium' > =A0# add files to array unless a directoy is found > =A0myFiles =3D Array.new << File.split(dir) unless File.file?("") You can simplify this enormously by using Dir#glob, like so: files =3D Dir.glob("C:/Users/RenshawFamily/maven/Music/Foo Fighters/Live At Wembley Stadium/*.mp3") #change for the format you use This way, you get only MP3 files (or whatever ending you specify) in an Array. Together with the regex advice, you'll have less of a headache with the script. ;) --=20 Phillip Gawlowski Though the folk I have met, (Ah, how soon!) they forget When I've moved on to some other place, There may be one or two, When I've played and passed through, Who'll remember my song or my face.