Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Simple sorting

From: al:bri:xtra at: 26-Sep-2002 13:51

Sean wrote:
> How do I get the code, listing: sort read %., to sort alphabetically by
directories first then by filenames? I'd use something like this: sort/compare probe read %/c/Rebol/ func [File1 [file!] File2 [file!]] [ if all [(#"/" = last File1) (#"/" <> last File2)] [return true] if all [(#"/" <> last File1) (#"/" = last File2)] [return false] File1 < File2 ] I'm almost sure that the sorting function could be improved. Andrew Martin ICQ: 26227169 http://valley.150m.com/