From: ara.t.howard@... Date: 2007-04-03T03:17:15+09:00 Subject: Re: folder delete script On Tue, 3 Apr 2007, Gus Hoppes wrote: > Hi. I am a rubyn00b. I need help. I'm trying to write a script that will > delete specific sub folders in a particular folder. I would like to delete > all folders that begin with lets say the letter "T" that are two weeks old. > It would probably work like the deltree command in dos (deltree T*.* /s). > How would I write that in ruby? Is it also possible to use wildcards in > ruby? If so how? Any help would be greatly appreciated. TY! > harp:~ > cat a.rb require 'fileutils' pattern = 'T*.*' Dir.glob('**/**') do |entry| next unless test ?d, entry FileUtils.rm_rf entry if File.fnmatch pattern, entry end -a -- be kind whenever possible... it is always possible. - the dalai lama