My web users all get a GUID upon initial login to the site - and whenever I serve up a file for download or viewing I put it in a folder named as that GUID.

The filenames are all pretty names - so they can print and download.

Why do you want a random filename?