/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import os, random random.choice(os.listdir("C:\\")) #change dir name to whatever
URL: http://stackoverflow.com/questions/701402/best-way-to-choose-a-random-file-from-a-directory