>Howdy experts,
>
>I am looking to calculate the number of files. I have a folder called bkngimgs. I want to allow my setup program to Capture the number of images that are in that irectory and then use that number to get a random number and select that file for the background image for my intial splash screen.
>
>Any ideas how to accomplish this? Is this a good approach or should I look at capturing all file names into a table and generating the random record against the table?
To get the number of files you can use afiles function.
In our application we use a table of images with the date for each image. I recently implemented a way to update the date of the image (advance in the future) as part of application startup process (we're using ASP.NET web application, but that's details). So, this is another approach, but random number should also work (but in this case users will get different images).
If it's not broken, fix it until it is.
My Blog