Choose random File to open

Ok so I have a million Roms for game emulators and I wanted to create an Applescript that would choose a random Rom to play. I am really at a loss of how to go about doing this though. Any suggestions/help?

Maybe this will help get you started:

choose folder with prompt "Randomly open a file in this folder:"
set sourceFolder to result

tell application "System Events"
	open some file of sourceFolder
end tell

That is so sweet. Thanks dude!

Or to be really random, try:

tell application “System Events”
open some file of some folder
end tell

:smiley:

Or how about a Russian roulette script:

delete some file of some folder

Yikes!

Aaron
http://zoopie.wordpress.com/