Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capturing File Count
Message
 
 
À
28/08/2017 16:41:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows 10
Divers
Thread ID:
01653809
Message ID:
01653810
Vues:
81
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform