Is there a program or .bat that will open a random file in the current folder?

link|improve this question

42% accept rate
You could probably write a script that built a list of files in a folder, and picked a random number to select an element from the list. But why? – BillN Jul 1 '10 at 23:59
1  
To what point ? – ldigas Jul 2 '10 at 0:00
2  
You could open the folder and then close your eyes while holding the down arrow until it feels right and then press enter. – pattern86 Sep 4 '10 at 23:17
there is %RANDOM%, SET /A and FOR - that should be enough to loop over files in a folder until the random counter reaches zero. Using PowerShell is a lot more comfortable, though :) – mihi Nov 29 '10 at 23:25
I can see how this type of thing would be useful. I'm on Linux, and I wrote a script a while back that randomly descends from the current directory until it hits a file. I wrote it to pick a random song from my music collection. – Joey Adams Mar 5 '11 at 7:27
show 3 more comments
feedback

closed as too localized by Tom Wijsman, random Aug 27 '11 at 18:15

This question is unlikely to ever help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. See the FAQ for guidance on how to improve it.

Browse other questions tagged or ask your own question.