ronin/examples/_OLD/random.file.lisp
2019-08-01 15:43:24 +09: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))