ronin/examples/random.file.lisp
2019-07-20 17:13:40 +02:00

14 lines
209 B
Common Lisp

; filesystem
; get files
(def files
(dir
(dirpath)))
; pick a random file
(def random-index
(floor
(random
(len files))))
; print random file name
(echo
(get files random-index))