Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does directory/folder exist?
Message
From
19/09/2012 15:11:14
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01553251
Message ID:
01553270
Views:
57
Do you mean that you only want to find root directories, and not subdirectories?

>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform