Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wildcard Matches for Directories
Message
De
03/03/2005 14:51:00
 
 
À
22/02/2005 11:36:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows '98
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
00988969
Message ID:
00992540
Vues:
29
>>>Is there a function out there that will perform similar to the sys(2000) function, but instead of rolling through files, one that will work with wildcard matches on folders? Basically, I have a folder with a bunch of folders within that with the first word as a username from my program, but it also has additional information in the folder's name following the username, but it seperated by a space. I want to be able to access that folder based on whom is logged in and use that username to go into that folder. Any ideas?
>>
>>You can use the ADIR() function to return the files in the current folder. Then you could spin throuh the elements of the array, checking the 5th element of each entry for a "D", meaning it's a folder.
>>
>>Be sure to tell ADIR() that you want to include folders by specifying a "D" in the 3rd argument!
>
>
>This seemed like the easiest way to do it. I tried it on the command line, worked perfect. Did it in the code and it either would not setup the array correctly, or error out something directly following it. But, the command worked smooth and beautiful in the command box. What is up with that? I hate that when things run different than what they do interactively.

What do you mean by "not setup the array correctly"? I've never noticed any difference between the command windows and code in regards to ADIR().
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform