Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching an entire drive for a file
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00030151
Message ID:
00030219
Views:
48
>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++.
Previous
Reply
Map
View

Click here to load this message in the networking platform