----- Original Message ----- From: "gabriele renzi" <surrender_it / rc1.vip.lng.yahoo.com> Newsgroups: comp.lang.ruby To: "ruby-talk ML" <ruby-talk / ruby-lang.org> Sent: Saturday, May 03, 2003 11:31 AM Subject: Cross platform `ls -t` > Is there a way using Dir to have a list of directory entries sorted by > time? > > What I'd like to have is a `ls -t` that works even on windows > (and no, I don't want ls.exe ;) Mmm. Something like this (untested): list = Dir["**"].sort {|x,y| File.stat(x).mtime < File.stat(y).mtime } Of course, it's inefficient -- a Schwartzian transform would make it faster. Hal