Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question regarding the file() command
Message
De
06/08/2009 12:12:17
Lamar Glover
Southeastern Apparel, Inc.
Dothan, Alabama, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01416491
Message ID:
01416515
Vues:
68
Thank you Sergey. That was exactly what I needed. Cut the response time if the machine is not on from 25 to 3 seconds.

Again, many thanks.

>Try to ping PC in question using WMI
>
>loLocator  = CREATEOBJECT('WBEMScripting.SWBEMLocator')
>loWMI	   = loLocator.ConnectServer()
>lcComputer = "UpsMachineName"
>loPing     = loWMI.Get([Win32_PingStatus.Address='] + lcComputer + ['])
>
>IF loPing.StatusCode = 0     && available
>...
>
>
>>Our business is catalog sales. We ship via UPS with their proprietary package. The shipping information is exported to a CSV file on the UPS machine. Our CSR's can access this file to get the most up to date shipping and tracking information. However, at times the shipping department closes earlier than the Customer Service Dept. and the UPS machine is not available. Prior to shutdown the CSV file located on the UPS machine is copied to our server.
>>
>>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?
>>
>>Any assistance is appreciated.
Lamar Glover
DP Manager, Southeastern Apparel, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform