> Date: Sat, 7 Feb 2009 00:49:47 -0500
> From: Satyendra Kumar Rai <[email protected]>
> 
>  I need to  a perform a specific operation on a list of files in a given
> directory in the order of the timestamps. Can someone please tell me how to
> go about this?

Use `directory-files-and-attributes' to generate a list of all the
files in a directory with their attributes.  One of these attributes
is the file's time stamp (for the details, see the doc string of
`directory-files-and-attributes').  Then use the `sort' primitive to
sort the list of the files by that attribute.  `sort' accepts a
predicate function for comparing 2 elements, so you will need to write
such a predicate.  You can find an example of such a predicate in
ls-lisp.el, it's called `ls-lisp-time-lessp'.

Happy hacking!


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to