First you need to count how many files there are:
var %count = $findfile(c:\path\name\,*.*,0,1)
then pick a random number from 1 to %count:
var %count = $rand(1,%count)
then pick the random'th file:
var %count = $findfile(c:\path\name\,*.*,%count,1)
You can also make some changes to look at *.map instead of *.*, or remove the ,1 to make it look in subfolders beneath.