Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

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

This question is unlikely to 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. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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
To what point ? –  ldigas Jul 2 '10 at 0:00
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

Browse other questions tagged or ask your own question.