Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching an entire drive for a file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00030151
Message ID:
00030219
Vues:
46
>I'm using VFP 3.0, and I can't seem to come up with a solution for this problem of mine. It seems so easy.
>
>I want to search the entire c: drive (or current drive) for the existance of a file. I would like the path returned if the search was successful.
>
>Is there something out there that will do this for me?
>

You can start at the root directory 'c:\' and use the FoxPro command ADIR() to recursively go through all the directories on the drive.

Just write a Fox routine that uses adir to retrieve a specified directory into an array, search the array, and then if it is not found call the same routine on all the directories in the array.

HTH
Peter
Peter Stephens
Visual Records, Inc.

Lead Programmer for the general purpose record keeping system Visual Records. Written primarily in VFP 6.0 with a little C++.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform