import os,sequtils,algorithm var v = toSeq(walkFiles("/bin/*")) sort(v,system.cmp[string]) for n in v: n.extractFilename.echo