Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Capturing File Count
Message
 
 
To
28/08/2017 16:41:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows 10
Miscellaneous
Thread ID:
01653809
Message ID:
01653810
Views:
82
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform