Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question regarding the file() command
Message
From
06/08/2009 11:09:03
 
 
To
06/08/2009 10:46:46
Lamar Glover
Southeastern Apparel, Inc.
Dothan, Alabama, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01416491
Message ID:
01416501
Views:
57
>Accessing the CSV file is handled in the following way:
>
>if file(\\UPS\*.csv)
>use the UPS machine csv file
>else
>use the Server csv file
>endif
>
>This does the job. However there is a significant delay returning the file() value if the UPS machine has been shut down.
>
>Is there a more efficient way to do this?

Sounds like the delay is waiting for the timeout of the server not responding to the file request. You might try using the ADIR function instead of the FILE function:
IF ADIR(laFile,"\\UPS\*.csv") > 0
  *-*  UPS available
ELSE
  *-*  Server file
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform