Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does directory/folder exist?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01553251
Message ID:
01553397
Vues:
37
Thank you for your input.

>Sure this works just fine.
>
>You can always pass full paths if relative paths may not be quite right.
>
>+++ Rick ---
>
>>The only "downside" I find with Directory() is that this function "looks" at the current folder. For example, if my program calls this function and passes a name to a sub-folder of the current folder, the Directory() returns .T. Here is an example:
>>
>>
>>*-- suppose current folder is  C:\APPFOLDER and folder C:\APPFOLDER\DATA exists.
>>cFolder2Check = "DATA"
>>? Directory( cFolder2Check)  && return .T.  even though I don't think of folder DATA existing; to me it is a subfolder and
>>                                               && I would prefer that Directory() return .F.
>>
>>
>>>
?Directory(cDir)
>>>
>>>>I am sure this questions has been asked million times and I even remember answers but forgot. What is the way to determine if a folder/directory exists without changing to this folder? And so that UNC would work too. E.g.
>>>>cDir = "\\ServerName\FolderName"
>>>>
>>>>TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform