Information générale
Catégorie:
Codage, syntaxe et commandes
>>>>I have to write an application that searches for a
>>>>specific file whose name I always know, but can reside
>>>>anyware on the drive (often out of the vfp search
>>>>path). What steps can I take to reliably find it?
>>>>
>>>>TIA
>>>>Chris
>>>
>>>
>>>Use the ADIR function to fill an array with directory/file information.
>>
>>Doesn't ADIR() work only on the default folder? If so, you'd have to add an iterative loop to handle every possible drive and folder.
>>
>>Barbara
>Not just default folder but like that (ie: curdir = c:\vfp, adir(myArray,"d:\program\*.*") would work). I wrote an iteration for this years ago and posted it in this thread (map pls.). I couldn't work it again and it executes on my K6-200 with a 4.3 Gb HD, 1265 directories in 30-50 secs (twice slower than dir /s). So it should be rewritten by recursion. If anybody does it I would like to have a copy too (if I retouch I will put the final in Files sec.) Also there are filer.exe from MS, filer2.zip from Dragan (in files sec. Classes-VCX) but haven't tested them yet.
Someone a while back on Compuserve sent up a recusrive ADIR() routine... I can look here on my machine and see if I still have a copy if you all like..
Thanx!
Tony MIller
Vancouver, Wa
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement