
Generate a random number 'n' between 1 and 500K and then take the nth file from the directory. Do you need truly random (in a math or crypto sense) or just "unpredictable and varied"? Charles -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Andrej van der Zee Sent: Friday, June 22, 2012 6:28 PM To: boost-users@lists.boost.org Subject: [Boost-users] Filesystem: Choose random file from directory Hi, I have a directory with about 500.000 thousand small files in it. I need to randomly select one of those file. What would be the *most efficient* way to achieve this? Thank you, Andrej _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users