Well, like it says in the title I need to figure out how to choose a random file from a folder with no idea on where to start or what to look for. Anyone willing to help me out?
Asked
Active
Viewed 696 times
1 Answers
2
Get the list of files in the folder using lfs module, store them in a table, and get a random element from that table using t[math.random(#t)]
expression.

Paul Kulchenko
- 25,884
- 3
- 38
- 56