!7 sS progID = #1007510; p { new L files; new Map ageMap; Pattern pat = Pattern.compile("^(.*)\\.backup(20\\d\\d)(\\d\\d)(\\d\\d)-(\\d\\d)$"); for (File f : listFilesNotDirs(programDir(progID))) { S s = f.getName(); Matcher matcher = pat.matcher(s); continue unless matcher.find(); continue unless neq(originalName, "concepts.structure.gz"); print("Found backup: " + sfu(matcherGroups(matcher))); S originalName = matcher.group(1); int year = matcherInt(matcher, 2); int month = matcherInt(matcher, 3); int day = matcherInt(matcher, 4); int hour = matcherInt(matcher, 5); long time = timestampFromYMDH(year, month, day, hour); int age = (int) ((now()-time)/1000/60/60/24); print("Age: " + age + " days"); ageMap.put(file, age); files.add(file); } sortByMap(files, ageMap); }