Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for a file in a directory
Message
De
07/01/2002 17:41:24
 
 
À
07/01/2002 17:15:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00600802
Message ID:
00601721
Vues:
18
Thanks Ed,

I will give it a go. I just want to poll the directory, and when a specific file arrives I will use your FileRun api to execute a processing function. My polling program should be lightweight.

Thanks
Glenn

>>Hi Ed,
>>
>>I need to watch for a file in a directory also, but I find no reference or example code in the download section which pertains to this specific requirement. Perhaps you could point me in the right direction?
>>
>
>I have a copy of Notify.Zip which claimed to do it, written by Houston Brennan; I object to it on the grounds that there's no source provided for part of the implementation. I'll email you a copy.
>
>>Thanks
>>
>>Glenn
>>
>>>>Hi,
>>>>
>>>>I need to write a program that will poll a directory for a specified file. The interval of time to poll the directory is preset. If found the program should process the file. When processing the file, the program should not poll for another file even if it meets the interval of time specified.
>>>>
>>>>I would like to know if there is a foxpro command/control that I can use.
>>>>
>>>
>>>
>>>Rather than this approach, I'd recommend that you monitor the directory using the WinAPI; there are a set of APIs specifically designed to asynchronously track and raise events as a result of changes to the content or attributes of a directory. There's a file in the Files Section which implements this type of event tracking, and you can write your own implementation in straight VFP with API calls if you're careful and use either Christof Lange's STRUCT class or my ClsHeap class to manage the external memory issues for you.
>>>
>>>>Can I use the timer control?
>>>>
>>>
>>>Yes, but you'll need to force your app to periodically respond to UI events to do so.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform