Information générale
Catégorie:
Codage, syntaxe et commandes
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?
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement