Neil's script has a flaw: you may get duplicates, because the some command chooses randomly with replacement. better to take the list of files, shuffle it, then select the first x items:
-- change this number to get different number of selected files
property numberOfFiles : 10
-- choose folder to randomly select from
set fPath to choose folder
tell application "Finder"
set f to files of folder fPath
my shuffle(f)
select items 1 thru numberOfFiles of f
end tell
on shuffle(l)
-- this handler shuffles a list of items. Have not tested it for thoroughness.
set c to count of l
repeat 2 times
repeat with i from 1 to c
copy item i of l to oldVal
set r to random numberfrom 1 toc
copy item r of l to item i of l
copy oldVal to item r of l
end repeat
end repeat
end shuffle
If you prefer to move files programmatically, then replace the select command with a move command:
tell application "Finder"
set f to files of folder fPath
my shuffle(f)
move (items 1 thru numberOfFiles of f) to folder (choose folder)
end tell