#Ruby Skript um gezielt alle index*.html/htm Dateien in einem Ordner und Unterordnern zu killen # (Platzersparnis!) mydirlist = Array.new mydirlist[0] = Dir.getwd #ok loop through the directories and check for the elements while (!mydirlist.empty?) Dir.chdir(mydirlist[-1]) #puts "Working at " + mydirlist[-1] mydirlist.slice! (-1) Dir["*"].each { |i| if (File.directory? (i)) then #add the dir for ze later evaluation mydirlist << Dir.getwd + '/' + i end #and here comes ze evaluation whether html or not #puts "Listing: " + i if (i[-4..-1]=='html') or (i[-3..-1]=='htm') then if (i[0..4] =='index') then puts 'Deleting ' + i File.delete(i) end end } end