Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
False return of DIRECTORY()
Message
From
10/01/2003 03:57:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00740190
Message ID:
00740196
Views:
19
Peter,

You can use the FileSystemObject to check its existence if it is hidden or a system folder.

loFSO = CREATEOBJECT( "Scripting.FileSystemObject")
?loFSO.FOLDEREXISTS( "c:\myfolder")


>If has directory flag Hidden or System or user doesn't right on the directory.
>
> MartinJ
>
>
>>VFP7 - Windows 2000 Small busyness Server
>>
>>Email_Dir = "T:\SAM_MAIN\SCIL\"
>>.
>>.
>>.
>>if not DIRECTORY(Email_Dir)
>> MKDIR(Email_Dir)
>>endif
>>
>>The MKDIR-line causes very scarcely the error:
>>Error: 1961
>>A subdirectory or file t:\sam_main\scil already exists.
>>
>>The subdirectory is actually there but why did DIRECTORY() not see it?
>>Is there a way to make it more secure?
>>
>>Thanks in advance
>>Peter
Previous
Reply
Map
View

Click here to load this message in the networking platform