Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locate Folder when only part of the folder name is known
Message
De
22/09/2010 15:45:25
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01482316
Message ID:
01482352
Vues:
68
>Hi...
>
>Is there a way, using FSO or something else, to determine if a folder exists and return the full folder name if I only know part of the folder name?
>
>What I am asking is if there is something akin to the LIKE clause in a where statement...Where FirstName like "A%" .
>
>Using FSO, I can determine if a folder exists using the FolderExists method, but I need to know the Full Folder Name. I have a situation where only part of the folder name is known. EG: Full folder name = ABC_10_25_1_This_Is_My_Test_Folder. But I only know the ABC_10_25_1 part and would like to return the entire folder name.
>
>I'm not locked into using FSO and only used that as an example for what I am attempting to solve.
>
>TIA for any guidance.

Have look at XDIR here in downloads. ( download#25487 )
It is class that reads folders and files underneath given path (could be entire drive)
and sends them as parameters to a two hook methods. One of the sample subclasses there gathers all files / folders into a cursor,
and another does simple file search. You can take those samples and customize to do folder search instead.

HTH
Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform