Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Faster FILE and DIRECTORY commands...
Message
From
04/12/2001 11:02:38
 
 
To
04/12/2001 10:52:23
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00589304
Message ID:
00589308
Views:
23
>Hi!
>
>I as wondering if anyone has an alternative to the FILE
>and DIRECTORY commands maybe an API call is better??? The problem is in our applications we have a lot of external sketches on various servers
>and it can be quite slow to run the FILE or DIRECTORY commands on server
>drives... (Especially if the file is missing or something...)
>
>For example if i run the command:
>
> DIRECTORY('T:\myfolder') and T: is not connected because e are offline
> it takes a long time to return .F.!
> also
> FILE('\\myserver\myshare\myfile.cnv') seems to take a long time when the file
>is not there..
>
>Thanks

Have you tried the FolderExists and FileExists methods of the FileSystemObject object? Something like:
fs=create("scripting.filesystemobject")
? fs.folderexists("T:\myfolder")
? fs.fileexists("\\myserver\myshare\myfile.cnv")
HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform